> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stablepayfi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 列举二维码支付单

> 分页查询指定二维码支付下的全部支付单。

分页查询指定二维码支付下的全部支付单，按创建时间降序返回。列表包含所有支付状态；二维码支付已关闭或过期时仍可查询历史。

`payments` 中每项沿用查询支付单接口的字段；空的可选字段省略，`id` 为支付会话 ID。

## 认证与请求头

使用 Bearer API Key 以及以下三个签名请求头。签名字符串为 `{timestamp}.{nonce}.{requestBody}`，算法为 HMAC-SHA256，小写 hex。GET 请求的 `requestBody` 为空字符串。

**Authorization** `string` *required*

Bearer API Key，例如 `Bearer sk_live_xxx`。

**X-StablePay-Timestamp** `string` *required*

Unix 时间戳（秒），必须与服务端时间相差不超过 5 分钟。

**X-StablePay-Nonce** `string` *required*

防重放随机字符串，长度 16–64 个字符；每次请求使用新的 nonce。

**X-StablePay-Signature** `string` *required*

使用商户 API Secret 计算的 HMAC-SHA256 小写 hex 签名。

## 路径参数

**deposit\_session\_id** `string` *required*

二维码支付 ID。

## 查询参数

**page** `integer` (default: 1)

页码，从 1 开始。空值、非整数、重复参数或超出范围均返回 400。

**page\_size** `integer` (default: 20)

每页条数，范围 1–100。空值、非整数、重复参数或超出范围均返回 400。

## 成功响应

HTTP `200`，返回指定页及总记录数。空页返回 `payments: []`，`total` 仍保留真实总记录数。

**payments** `object[]` *required*

当前页支付单列表。

**支付单字段**

**id** `string` *required*

支付会话 ID。

**amount\_total** `integer` *required*

原订单总金额，使用原订单币种的最小货币单位。

**currency** `string` *required*

原订单币种的小写代码。

**payment\_status** `string` *required*

允许值：`pending`、`processing`、`paid`、`failed`、`expired`、`canceled`、`frozen`。

**created** `integer` *required*

创建时间，Unix 秒。

**expires\_at** `integer` *required*

过期时间，Unix 秒。

**url** `string`

支付页面 URL。

**line\_items** `object[]`

商品明细，仅在存在时返回。

**tax\_amount** `integer`

税费金额，使用原订单币种的最小货币单位。

**shipping\_amount** `integer`

运费金额，使用原订单币种的最小货币单位。

**exchange\_rate** `string`

汇率值，仅在存在汇率转换时返回。

**target\_currency** `string`

目标支付币种。

**target\_amount\_total** `integer`

目标支付金额，使用目标币种的最小货币单位。

**rate\_locked\_at** `integer`

汇率锁定时间，Unix 秒。

**subscription\_id** `string`

关联订阅 ID，仅在存在时返回。

**invoice\_id** `string`

关联账单 ID，仅在存在时返回。

**total** `integer` *required*

该二维码支付下的支付单总数，不受当前页影响。

**page** `integer` *required*

当前页码。

**page\_size** `integer` *required*

本次查询的每页条数。

```json theme={"system"}
{
  "payments": [
    {
      "id": "20261113110100101082920000542002",
      "amount_total": 1,
      "currency": "usdc",
      "payment_status": "paid",
      "created": 1794544360,
      "expires_at": 1794544420,
      "url": "https://checkout.example/#/pay/20261113110100101082920000542002/example-token",
      "target_currency": "USDC",
      "target_amount_total": 1
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 20
}
```

## 错误响应

* `400`：分页参数无效。
* `401`：鉴权失败。
* `404 resource_not_found`：二维码支付不存在或不属于当前商户。
* `500`：服务内部错误。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.