> ## 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.

# List Payments by Trade ID

> Get payment flow list by trade_id. Returns all payment flows (including retries) for a specific trade.

Get payment flow list by trade\_id. Returns all payment flows (including retries) for a specific trade.


## OpenAPI

````yaml openapi/v1-en.yaml GET /api/v1/payments
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: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/payments:
    get:
      tags:
        - Payment
      summary: List Payments by Trade ID
      description: >-
        Get payment flow list by trade_id. Returns all payment flows (including
        retries) for a specific trade.
      operationId: v1-payment-list-payments-by-trade-id
      parameters:
        - name: trade_id
          in: query
          description: Trade ID
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPaymentsResponse'
        '400':
          description: trade_id is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                code: parameter_missing
                message: trade_id is required
        '404':
          description: trade_id does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                code: resource_missing
                message: trade_id does not exist
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListPaymentsResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListPaymentsResponse_Data'
      description: ListPaymentsResponse
    BaseResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
    ListPaymentsResponse_Data:
      type: object
      properties:
        total:
          type: string
          description: Total count
        list:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
          description: Payment flow list
      description: ListPaymentsResponse
    Payment:
      type: object
      properties:
        id:
          type: string
          description: Database primary key ID (Snowflake ID, string format)
        out_trans_id:
          type: string
          description: Payment flow ID
        trade_id:
          type: string
          description: Order ID / Trade ID
        merchant_id:
          type: string
          description: Merchant ID
        payment_method:
          type: string
          description: Payment method
        payment_channel:
          type: string
          description: Payment channel
        status:
          type: string
          description: Payment status
        amount:
          type: string
          description: Payment amount, truncated to two decimal places
        currency:
          type: string
          description: Currency
        channel_trade_id:
          type: string
          description: Channel transaction ID
        order_trans_id:
          type: string
          description: >-
            Order transaction ID (globally unique, represents one payment
            attempt)
        channel_payment_method:
          allOf:
            - $ref: '#/components/schemas/ChannelPaymentMethod'
          description: Payment method information
        created_at:
          type: string
          description: Creation time
        channel_ret_code:
          type: string
          description: Channel return code
        channel_ret_msg:
          type: string
          description: Channel return message
        verification:
          allOf:
            - $ref: '#/components/schemas/Verification'
          description: >-
            Card payment verification result (CVC / AVS / 3DS); null for
            non-card payments or when unavailable
      description: Payment
    ChannelPaymentMethod:
      type: object
      properties:
        type:
          type: string
          description: Type, fixed value "card"
        card:
          allOf:
            - $ref: '#/components/schemas/CardInfo'
          description: Card information
      description: ChannelPaymentMethod
    Verification:
      type: object
      properties:
        cvc_check:
          type: string
          description: 'CVC check result: pass / fail / unchecked / unavailable'
        avs:
          allOf:
            - $ref: '#/components/schemas/Avs'
          description: Address verification results; null when not triggered
        three_d_secure:
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure'
          description: 3DS verification results; null when 3DS not performed
      description: Verification - Card payment verification results
    CardInfo:
      type: object
      properties:
        brand:
          type: string
          description: Card brand
        country:
          type: string
          description: Issuing country
        last4:
          type: string
          description: Last 4 digits of card number
        funding:
          type: string
          description: Card type (credit/debit)
      description: CardInfo
    Avs:
      type: object
      properties:
        line1_check:
          type: string
          description: 'Address line check: pass / fail / unchecked / unavailable'
        postal_code_check:
          type: string
          description: 'Postal code check: pass / fail / unchecked / unavailable'
      description: Avs - Address verification results
    ThreeDSecure:
      type: object
      properties:
        authentication_flow:
          type: string
          description: 'Authentication flow: frictionless / challenge'
        result:
          type: string
          description: >-
            Result: authenticated / attempt_acknowledged / not_supported /
            failed / exempted / processing_error
        result_reason:
          type: string
          description: Failure or downgrade reason, empty when successful
        version:
          type: string
          description: 3DS protocol version, e.g. 2.2.0
        eci:
          type: string
          description: ECI indicator; empty when not returned
      description: ThreeDSecure - 3DS verification details
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````