# 查询支付链接列表

> 按状态、关键词、创建时间和分页条件查询支付链接列表。

```yaml
openapi: 3.1.0
info:
  title: 查询支付链接列表
  version: 1.0.0
  description: 按状态、关键词、创建时间和分页条件查询支付链接列表。
paths:
  /v1/txn/paymentLink/list:
    post:
      summary: 查询支付链接列表
      description: 按状态、关键词、创建时间和分页条件查询支付链接列表。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                merchantNo:
                  type: string
                  description: Onerway 分配的商户号；获取方式参见[接入准备](/zh/payments/get-started/setup#获取凭证)。
                linkStatus:
                  type: number
                  description: 支付链接状态筛选条件；省略时查询全部链接。
                  enum:
                    - "1"
                    - "0"
                  x-enum-descriptions:
                    "0": 已停用。
                    "1": 已启用。
                  x-onerway-constraints:
                    - kind: values
                      text: 本列表查询接口按数字 `1` / `0` 传入；不要传 boolean `true` / `false`。
                keywords:
                  type: string
                  description: 关键词筛选条件，支持按 Payment Link ID 或商品名称模糊匹配。
                startTime:
                  type: string
                  description: 按支付链接创建时间筛选的时间范围起点，格式 `yyyy-MM-dd HH:mm:ss`。
                endTime:
                  type: string
                  description: 按支付链接创建时间筛选的时间范围终点，格式 `yyyy-MM-dd HH:mm:ss`。
                current:
                  type: number
                  description: 列表查询页码。`0` 和 `1` 都表示第一页；响应中的 `current` 统一返回 1-based 页码（第一页为 `1`）。
                size:
                  type: number
                  description: 分页大小；列表查询必填。
                  x-onerway-constraints:
                    - kind: values
                      text: 当前接口固定每页 `10` 条，不支持调整每页数量。
                sign:
                  type: string
                  description: 请求签名字符串；生成方式详见[请求签名](/zh/payments/get-started/request-signing)。
              required:
                - merchantNo
                - current
                - size
                - sign
            examples:
              list-payment-links:
                summary: 查询支付链接列表
                value:
                  current: 1
                  endTime: 2026-05-25 23:59:59
                  keywords: payment_link_demo
                  linkStatus: 1
                  merchantNo: replace_with_merchant_no
                  sign: "{{SIGN}}"
                  size: 10
                  startTime: 2026-05-01 00:00:00
      responses:
        "200":
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: 响应码；`20000`
                      表示请求处理成功，其余为错误码。完整码表见[响应码](/zh/payments/api-reference/response-codes)。
                  respMsg:
                    type: string
                    description: 响应码对应的可读说明。
                  data:
                    type: object
                    properties:
                      content:
                        type: array
                        description: 符合查询条件的支付链接记录列表。
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Payment Link ID。
                            linkUrl:
                              type: string
                              description: 买家访问支付链接收银台页面的 URL。
                            merchantNo:
                              type: string
                              description: Onerway 分配的商户号，标识商户账户。
                            linkName:
                              type: string
                              description: 支付链接展示名称，用于在列表查询和商户运营中识别链接。
                            amount:
                              type: string
                              description: 支付链接金额，回显创建时的金额。
                            currency:
                              type: string
                              description: 支付链接币种，[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 三位字母货币代码。
                            defaultCountry:
                              type: string
                              description: 支付链接配置的默认国家或地区代码，建议使用 [ISO 3166-1
                                alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
                                两位字母国家代码。
                            itemName:
                              type: string
                              description: 商品或服务名称，展示给买家。
                            description:
                              type: string
                              description: 商品或服务描述，展示给买家。
                            linkStatus:
                              type: number
                              description: 支付链接状态；列表查询响应返回数字 `1` / `0`。
                              enum:
                                - "1"
                                - "0"
                              x-enum-descriptions:
                                "0": 已停用。
                                "1": 已启用。
                              x-onerway-constraints:
                                - kind: values
                                  text: 本列表查询接口按数字 `1` / `0` 传入；不要传 boolean `true` / `false`。
                            createTime:
                              type: string
                              description: 创建时间，格式 `yyyy-MM-dd HH:mm:ss`。
                            visitCount:
                              type: string
                              description: 支付链接访问次数。
                            payCount:
                              type: string
                              description: 通过该支付链接完成的成功支付次数。
                            successAmount:
                              type: string
                              description: 通过该支付链接成功收取的支付总金额。
                      current:
                        type: string
                        description: 响应中的当前页码，统一返回 1-based 页码。
                      size:
                        type: number
                        description: 分页大小（page size）；当前页实际记录数以 `data.content.length` 为准，请以响应分页字段确认返回页大小。
                      totalPages:
                        type: number
                        description: 按当前页大小计算的总页数。
                      totalElements:
                        type: number
                        description: 符合查询条件的支付链接总条数。
                    description: 业务数据对象，包含支付链接分页查询结果。
```
