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

# 按时间范围查询支付流水列表

> 根据时间范围和筛选条件查询支付流水。支持基于游标的分页导航。商户可以根据创建时间筛选支付记录。

根据时间范围和筛选条件查询支付流水。支持基于游标的分页导航。商户可以根据创建时间筛选支付记录。


## OpenAPI

````yaml openapi/v1-zh.yaml GET /api/v1/payments/list
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: 折扣
    description: 折扣
  - name: 发票
    description: 发票
  - name: 退款
    description: 退款
  - name: 商品管理
    description: 商品管理
  - name: 订阅
    description: 订阅
  - name: 商品定价
    description: 商品定价方案
  - name: 交易单
    description: 交易单
  - name: 支付流水
    description: 支付流水
  - name: 结账会话
    description: 结账会话
  - name: 顾客
    description: 顾客
  - name: 顾客门户
    description: 顾客门户
  - name: Webhook
    description: Webhook
  - name: 争议
    description: 争议订单
paths:
  /api/v1/payments/list:
    get:
      tags:
        - 支付流水
      summary: 按时间范围查询支付流水列表
      description: 根据时间范围和筛选条件查询支付流水。支持基于游标的分页导航。商户可以根据创建时间筛选支付记录。
      operationId: v1-payment-query-payments
      parameters:
        - name: created_at.gt
          in: query
          description: 用于过滤的最小值（不包含，RFC3339格式的UTC时间，例如'2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.gte
          in: query
          description: 用于过滤的最小值（包含，RFC3339格式的UTC时间，例如'2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lt
          in: query
          description: 用于过滤的最大值（不包含，RFC3339格式的UTC时间，例如'2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lte
          in: query
          description: 用于过滤的最大值（包含，RFC3339格式的UTC时间，例如'2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: limit
          in: query
          description: |-
            返回对象数量的限制。限制范围在 1 到 100 之间
             默认值：如果未指定，则为 50
          schema:
            type: integer
            format: int32
        - name: starting_after
          in: query
          description: |-
            分页：starting_after ID 用于向前分页
             使用上一个响应中的 id 作为 starting_after 来获取下一页
             与 ending_before 互斥
          schema:
            type: string
        - name: ending_before
          in: query
          description: |-
            分页：ending_before ID 用于向后分页
             使用上一个响应中的 id 作为 ending_before 来获取上一页
             与 starting_after 互斥
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                code: parameters_exclusive
                message: >-
                  starting_after and ending_before are mutually exclusive, only
                  one can be provided
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: 请求的唯一标识符
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListPaymentResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListPaymentResponse_Data'
      description: ListPaymentResponse - 支付流水列表响应
    BaseResponse:
      type: object
      properties:
        code:
          type: string
          description: 错误码
        message:
          type: string
          description: 错误详细信息
    ListPaymentResponse_Data:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
          description: 支付流水列表（按 created_at DESC, id DESC 排序）
        has_more:
          type: boolean
          description: |-
            此集合之后是否还有更多元素可用
             如果为 false，则此集合表示列表的末尾
      description: ListPaymentResponse - 支付流水列表响应
    Payment:
      type: object
      properties:
        id:
          type: string
          description: 数据库主键ID（雪花ID，字符串格式）
        out_trans_id:
          type: string
          description: 支付流水ID
        trade_id:
          type: string
          description: 订单ID / 交易ID
        merchant_id:
          type: string
          description: 商户ID
        payment_method:
          type: string
          description: 支付方式
        payment_channel:
          type: string
          description: 支付渠道
        status:
          type: string
          description: 支付状态
        amount:
          type: string
          description: 支付金额，截断到两位小数
        currency:
          type: string
          description: 币种
        channel_trade_id:
          type: string
          description: 渠道交易ID
        order_trans_id:
          type: string
          description: 订单交易ID（全局唯一，代表一次支付尝试）
        channel_payment_method:
          allOf:
            - $ref: '#/components/schemas/ChannelPaymentMethod'
          description: 支付方式信息
        created_at:
          type: string
          description: 创建时间
        channel_ret_code:
          type: string
          description: 渠道返回码
        channel_ret_msg:
          type: string
          description: 渠道返回消息
        verification:
          allOf:
            - $ref: '#/components/schemas/Verification'
          description: 卡支付安全验证结果（CVC / AVS / 3DS）；非卡支付或失败时为 null
      description: Payment - 支付流水
    ChannelPaymentMethod:
      type: object
      properties:
        type:
          type: string
          description: 类型，固定值 "card"
        card:
          allOf:
            - $ref: '#/components/schemas/CardInfo'
          description: 卡片信息
      description: ChannelPaymentMethod - 渠道支付方式
    Verification:
      type: object
      properties:
        cvc_check:
          type: string
          description: CVC 校验结果：pass / fail / unchecked / unavailable
        avs:
          allOf:
            - $ref: '#/components/schemas/Avs'
          description: 地址校验结果；未触发时为 null
        three_d_secure:
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure'
          description: 3DS 校验结果；未走 3DS 时为 null
      description: Verification - 卡支付安全验证结果
    CardInfo:
      type: object
      properties:
        brand:
          type: string
          description: 卡片品牌
        country:
          type: string
          description: 发卡国家
        last4:
          type: string
          description: 卡号后4位
        funding:
          type: string
          description: 卡片类型（信用卡/借记卡）
        authcode:
          type: string
          description: 发卡行授权码；卡支付有值，非卡支付为空
        network_transaction_id:
          type: string
          description: 卡组织网络交易 ID；卡支付有值，非卡支付为空
      description: CardInfo - 卡片信息
    Avs:
      type: object
      properties:
        line1_check:
          type: string
          description: 地址行校验：pass / fail / unchecked / unavailable
        postal_code_check:
          type: string
          description: 邮编校验：pass / fail / unchecked / unavailable
      description: Avs - 地址校验结果
    ThreeDSecure:
      type: object
      properties:
        authentication_flow:
          type: string
          description: 认证流程：frictionless / challenge
        result:
          type: string
          description: >-
            认证结果：authenticated / attempt_acknowledged / not_supported / failed /
            exempted / processing_error
        result_reason:
          type: string
          description: 失败 / 降级原因，成功时为空
        version:
          type: string
          description: 3DS 协议版本，如 2.2.0
        eci:
          type: string
          description: ECI 电子商务指示符；非 3DS 交易或发卡行未返回时为空
      description: ThreeDSecure - 3DS 校验结果
  securitySchemes:
    sec0:
      type: http
      description: 'Bearer API Key 鉴权。格式：Authorization: Bearer {your_api_key}'
      scheme: bearer

````