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

# List Payments

> Filter payments using the supported query parameters.



## OpenAPI

````yaml get /v1/aggregators/{raast-aggregator-id}/payments
openapi: 3.1.0
info:
  title: Raast Wire
  version: 1.0.0
  description: ''
servers:
  - url: https://api.getsafepay.com/raastwire
security: []
tags:
  - name: Aggregators
  - name: Access Keys
  - name: Merchants
  - name: Raast Merchants
  - name: Payments
  - name: Refunds
  - name: QRs
  - name: Utilities
  - name: Aliases
  - name: Ledgers
  - name: Webhooks
paths:
  /v1/aggregators/{raast-aggregator-id}/payments:
    parameters:
      - $ref: '#/components/parameters/AggregatorIdParam'
    get:
      tags:
        - Payments
      summary: List Payments
      description: Filter payments using the supported query parameters.
      parameters:
        - name: limit
          in: query
          required: false
          description: Maximum number of payments to return in the result set.
          example: 10
          schema:
            type: string
        - name: offset
          in: query
          required: false
          description: Number of payments to skip before starting the result set.
          example: 0
          schema:
            type: string
        - name: aggregator_merchant_id
          in: query
          required: false
          description: Filter by Safepay aggregator merchant identifier.
          example: am_1234567890
          schema:
            type: string
        - name: order_id
          in: query
          required: false
          description: Filter by the merchant supplied order identifier.
          example: O_12345
          schema:
            type: string
        - name: request_id
          in: query
          required: false
          description: Filter by the client generated idempotent request identifier.
          example: mMqCEa7Vajgtuu1VSXz4k8ri4R3
          schema:
            type: string
        - name: trace_reference
          in: query
          required: false
          description: Filter by the trace reference assigned during processing.
          example: bADGhCLmi8f7j9FeRDe3IuyQjCzlM34eZsGS1
          schema:
            type: string
        - name: msg_id
          in: query
          required: false
          description: Filter by the Raast network message identifier.
          example: dmNP1FtMPEQEjvFRJSMZI1VpWohKubU8yV6o2
          schema:
            type: string
        - name: pmt_inf_id
          in: query
          required: false
          description: Filter by the payment information identifier from the Raast message.
          example: sTvT4lBvWPHWXw7Y44msStMB
          schema:
            type: string
        - name: uetr
          in: query
          required: false
          description: Filter by the Unique End-to-end Transaction Reference (UETR).
          example: ee942c2e9854960d
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Filter by the payment status.
          example: P_RECEIVED
          schema:
            type: string
            enum:
              - P_INITIATED
              - P_RECEIVED
              - P_CANCELLED
              - P_REJECTED
              - P_FAILED
              - P_AUTHORIZED
              - P_REVERSED
              - P_CAPTURED
              - P_SETTLED
              - P_PARTIALLY_REFUNDED
              - P_REFUNDED
        - name: type
          in: query
          required: false
          description: Filter by the payment type.
          example: RTP_LATER
          schema:
            type: string
            enum:
              - RTP_NOW
              - RTP_LATER
              - STATIC_QR
              - DYNAMIC_QR
        - name: payment_id
          in: query
          required: false
          description: Filter by the payment identifier.
          example: pm_2288490a-2176-4de5-b373-0ffb6f8e2e6e
          schema:
            type: string
        - name: qr_code_id
          in: query
          required: false
          description: Filter by the QR code identifier associated with the payment.
          example: qr_503d916b-9ad5-44aa-8d41-1ad656882f7f
          schema:
            type: string
        - name: end_to_end_id
          in: query
          required: false
          description: Filter by the end-to-end identifier recorded for the payment.
          example: E2E-09771234
          schema:
            type: string
        - name: instr_id
          in: query
          required: false
          description: Filter by the instruction identifier from the Raast message payload.
          example: INSTR-88921
          schema:
            type: string
        - name: start_date
          in: query
          required: false
          description: Filter payments created on or after this date (UNIX timestamp).
          example: 1735689600
          schema:
            type: integer
        - name: end_date
          in: query
          required: false
          description: Filter payments created on or before this date (UNIX timestamp).
          example: 1767225600
          schema:
            type: integer
      responses:
        '200':
          $ref: '#/components/responses/ListPaymentsResponse'
      security:
        - apiKey: []
components:
  parameters:
    AggregatorIdParam:
      name: raast-aggregator-id
      in: path
      required: true
      schema:
        type: string
        example: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
      description: The unique identifier for the aggregator
  responses:
    ListPaymentsResponse:
      description: Paginated list of payments linked to a merchant
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLengthHeader'
        Date:
          $ref: '#/components/headers/DateHeader'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/StandardResponse'
              - type: object
                properties:
                  data:
                    type: object
                    description: Paginated payment collection payload.
                    properties:
                      count:
                        type: string
                        example: '605'
                        description: >-
                          Total number of payments matching the supplied
                          filters.
                      payments:
                        type: array
                        description: List of payments matching the supplied filters.
                        items:
                          $ref: '#/components/schemas/Payment'
          examples:
            PaymentsListing:
              value:
                api_version: v1
                data:
                  payments:
                    - id: '644'
                      token: pm_f37a10dd-c530-4d86-8483-be473e820578
                      aggregator_merchant_id: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                      order_id: has_3320
                      type: DYNAMIC_QR
                      amount: '250'
                      status: P_REJECTED
                      uetr: e3391812-f9f5-4feb-bd6d-60698e9b662f
                      trace_reference: ce08b498-376c-41dd-b32b-f814441c4507
                      msg_id: FE0PMU5HHKKPF4S7PLR20M8HKBYI57WAUV5
                      pmt_inf_id: 9545TGYRG0F6DCQEF2ZH7UCOCU57FUNYDL9
                      request_id: 6a049190-3595-47cb-8603-7e310c3adb15
                      expires_at: '2025-06-27T06:47:34Z'
                      created_at: '2025-06-27T06:45:35Z'
                      updated_at: '2025-06-27T06:48:33Z'
                    - id: '643'
                      token: pm_49707018-026f-4159-8b1a-da0e3b482cbb
                      aggregator_merchant_id: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                      order_id: order03330
                      type: RTP_LATER
                      amount: '22000'
                      status: P_INITIATED
                      uetr: 8fe838bb-57f7-4488-8198-b7b240eac83c
                      trace_reference: 5041299c-c5bd-4ac0-b3f8-b6131f15c55f
                      msg_id: 54QMCJLI7UATICTM1MZYPXESGMJ5O5TXUSX
                      pmt_inf_id: LWMEZ7RUGR92H0TJKMUSKOCC381NK9Z2K8C
                      request_id: 8f20f196-e1c9-46b7-9b41-67f17baa7438
                      expires_at: '2025-07-03T11:21:23Z'
                      created_at: '2025-06-26T11:21:23Z'
                      updated_at: '2025-06-26T11:21:23Z'
                  count: '605'
  headers:
    ContentLengthHeader:
      schema:
        type: string
        example: '256'
    DateHeader:
      schema:
        type: string
        example: Sat, 12 Aug 2023 08:55:04 GMT
  schemas:
    StandardResponse:
      type: object
      description: Standard response structure for successful operations
      properties:
        api_version:
          type: string
          example: v1
          description: The current version of the API spec
        data:
          type: object
          description: Contains the response data
    Payment:
      type: object
      description: Payment record returned by Safepay aggregator APIs.
      properties:
        id:
          type: string
          description: Internal identifier for the payment record.
        token:
          type: string
          description: Public token that uniquely identifies the payment.
        aggregator_id:
          type: string
          description: Aggregator identifier that owns the payment.
        aggregator_merchant_id:
          type: string
          description: Aggregator merchant on whose behalf the payment was initiated.
        qr_code_id:
          type: string
          description: Identifier of the QR code associated with the payment.
        order_id:
          type: string
          description: Merchant-supplied order identifier for the payment.
        type:
          type: string
          description: Indicates how the payment request was initiated.
          enum:
            - RTP_NOW
            - RTP_LATER
            - STATIC_QR
            - DYNAMIC_QR
        amount:
          type: string
          description: Payment amount expressed as a string to preserve formatting.
        status:
          type: string
          description: Current status of the payment.
          enum:
            - P_INITIATED
            - P_RECEIVED
            - P_CANCELLED
            - P_REJECTED
            - P_FAILED
            - P_AUTHORIZED
            - P_REVERSED
            - P_CAPTURED
            - P_SETTLED
            - P_PARTIALLY_REFUNDED
            - P_REFUNDED
        uetr:
          type: string
          description: Unique End-to-end Transaction Reference assigned by Raast.
        trace_reference:
          type: string
          description: Trace reference identifier used for reconciliation.
        msg_id:
          type: string
          description: Raast network message identifier for the payment.
        instr_id:
          type: string
          description: Instruction identifier from the Raast message payload.
        end_to_end_id:
          type: string
          description: End-to-end identifier recorded for the payment.
        pmt_inf_id:
          type: string
          description: Payment information identifier from the Raast message.
        request_id:
          type: string
          description: Client-supplied idempotency identifier.
        msg_created_at:
          type: string
          description: Timestamp captured in the Raast message associated with the payment.
        expires_at:
          allOf:
            - $ref: '#/components/schemas/Timestamp'
          description: Expiry timestamp for the payment request.
          nullable: true
        created_at:
          allOf:
            - $ref: '#/components/schemas/Timestamp'
          description: Timestamp when the payment record was created.
        updated_at:
          allOf:
            - $ref: '#/components/schemas/Timestamp'
          description: Timestamp when the payment record was last updated.
        txn_logs:
          type: array
          description: Lifecycle events generated for the payment.
          items:
            $ref: '#/components/schemas/TransactionLogs'
        payment_parties:
          type: array
          description: Participant records involved in the payment lifecycle.
          items:
            $ref: '#/components/schemas/PaymentParty'
        debitor:
          type: object
          description: Debitor metadata when available.
          nullable: true
        qr_code:
          allOf:
            - $ref: '#/components/schemas/QRCode'
          description: QR code details associated with the payment when available.
          nullable: true
        aggregator_merchant:
          allOf:
            - $ref: '#/components/schemas/Merchant'
          description: Aggregator merchant details when linked to the payment.
          nullable: true
        refunds:
          type: array
          description: Refunds applied to the payment.
          items:
            $ref: '#/components/schemas/Refund'
        settlement:
          type: object
          description: Settlement information for the payment when applicable.
          nullable: true
    Timestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp in UTC
      example: '2025-03-13T09:12:34.000Z'
    TransactionLogs:
      type: object
      description: Event log generated for a payment lifecycle transition.
      properties:
        id:
          type: string
          description: Identifier of the transaction log entry.
        type:
          type: string
          description: Classification of the logged event.
        payment_id:
          type: string
          description: Identifier of the payment linked to the event.
        status:
          type: string
          description: Payment status recorded by this log entry.
        refund_id:
          type: string
          description: Refund identifier when the log entry references a refund.
        settlement_id:
          type: string
          description: >-
            Settlement identifier when the log entry references settlement
            activity.
        txn_desc:
          type: string
          description: Human-readable description of the event.
        addtl_info:
          type: string
          description: Additional information provided for the event.
        token:
          type: string
          description: Public token assigned to the log entry.
        timestamp:
          type: string
          format: date-time
          description: ISO-8601 timestamp captured for the event.
        iso_msg_type:
          type: string
          description: Raast ISO message type associated with this event.
    PaymentParty:
      type: object
      description: Participant record linked to a payment or payout
      properties:
        id:
          type: string
          description: Internal Safepay identifier for the payment party
        token:
          type: string
          description: Public token representing the payment party
        role:
          type: string
          description: Role played by the participant in the transaction lifecycle
        payment_id:
          type: string
          description: Identifier of the payment that this party belongs to
        bank_account_id:
          type: string
          description: Identifier of the linked bank account
        bank_account:
          $ref: '#/components/schemas/BankAccount'
          description: Bank account resource associated with the party when available
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    QRCode:
      type: object
      properties:
        id:
          type: string
        token:
          type: string
        aggregator_merchant_id:
          type: string
        type:
          type: string
        code:
          type: string
        terminal_label:
          type: string
        reference_label:
          type: string
        is_deleted:
          type: boolean
        created_at:
          type: string
          format: date-time
    Merchant:
      type: object
      description: Merchant resource created under an aggregator for Raast transactions
      properties:
        id:
          type: string
          description: Internal Safepay identifier for the merchant
        token:
          type: string
          description: Public token identifying the aggregator merchant
        name:
          type: string
          description: Display name of the merchant
        aggregator_id:
          type: string
          description: Identifier of the aggregator that owns the merchant
        merchant_id:
          type: string
          description: Identifier of the linked Raast merchant account
        merchant_external_id:
          type: string
          description: Original merchant identifier provided by the aggregator
        bank_account_id:
          type: string
          description: Identifier of the settlement bank account
        enabled:
          type: boolean
          description: Indicates whether the merchant is currently active
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        raast_merchant:
          $ref: '#/components/schemas/RaastMerchant'
        rate_card:
          $ref: '#/components/schemas/RateCard'
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    Refund:
      type: object
      properties:
        token:
          type: string
        payment_id:
          type: string
        amount:
          type: string
        type:
          type: string
        reason:
          type: string
        addtl_info:
          type: string
        status:
          type: string
        trace_reference:
          type: string
        msg_id:
          type: string
        return_id:
          type: string
        request_id:
          type: string
        msg_created_at:
          $ref: '#/components/schemas/Timestamp'
        settle_at:
          nullable: true
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    BankAccount:
      type: object
      properties:
        id:
          type: string
          description: Internal Safepay identifier for the bank account
        token:
          type: string
        vault_token:
          type: string
        title:
          type: string
        iban:
          type: string
        redacted_iban:
          type: string
        hashed_iban:
          type: string
        servicer:
          type: string
        bank:
          type: string
        depositor_id:
          type: string
        owner:
          type: string
        kind:
          type: integer
        version:
          type: string
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    RaastMerchant:
      type: object
      description: Raast merchant profile synchronized from the state bank registry
      properties:
        id:
          type: string
          description: Internal Safepay identifier for the Raast merchant record
        token:
          type: string
          description: Public Raast merchant token
        partner_id:
          type: string
          description: Identifier of the upstream partner associated with the merchant
        raast_record_id:
          type: string
          description: Identifier issued by the Raast directory
        status:
          type: string
          description: Current activation status reported by Raast
        uid_type:
          type: string
          description: Type of the merchant unique identifier such as NTN or CNIC
        uid_value:
          type: string
          description: Value of the unique identifier registered with Raast
        name:
          type: string
          description: Legal entity name on file with Raast
        document_type:
          type: string
          description: Supporting document type recorded during onboarding
        document_number:
          type: string
          description: Number of the supporting document
        address_details:
          type: object
          description: Merchant registered address per Raast records
          properties:
            country:
              type: string
              description: ISO 3166-1 alpha-2 country code
            city:
              type: string
              description: City of the address
            state_province_region:
              type: string
              description: Province or region of the address
            address_line:
              type: string
              description: Street-level address line
        contact_details:
          type: object
          description: Merchant contact information on file
          properties:
            mobile_number:
              type: string
              description: Merchant contact mobile number in E.164 format
            email:
              type: string
              format: email
              description: Merchant contact email address
        additional_details:
          type: object
          description: Optional public metadata collected during onboarding
          properties:
            dba:
              type: string
              description: Doing-business-as name if different from the legal name
            mcc:
              type: string
              description: Merchant category code associated with the merchant
            lat:
              type: string
              description: Latitude coordinate when available
            long:
              type: string
              description: Longitude coordinate when available
        additional_details_private:
          type: object
          description: Safepay private metadata for the Raast merchant
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    RateCard:
      type: object
      description: Rate configuration associated with a merchant for Raast payments
      properties:
        id:
          type: string
          description: Internal Safepay identifier for the rate card linkage
        token:
          type: string
          description: Public token representing the merchant rate card
        aggregator_merchant_id:
          type: string
          description: Identifier of the aggregator merchant that owns the rate card
        connector_id:
          type: string
          description: Identifier of the connector through which payments are processed
        rate_card_id:
          type: string
          description: Identifier of the underlying rate definition template
        ratecard_kind:
          $ref: '#/components/schemas/RateCardKind'
        fixed_rate:
          type: integer
          description: Fixed transaction fee in paisa when applicable
        tax_rate:
          type: number
          description: Tax rate applied to the fixed fee (fractional value)
        tax_region:
          type: string
          description: Region for which the tax rate applies
        variable_rate:
          type: number
          description: Percentage fee applied to the transaction amount
        sales_tax_withholding:
          type: number
          description: >-
            Sales tax withholding rate applied to the transaction (fractional
            value)
        income_tax_withholding:
          type: number
          description: >-
            Income tax withholding rate applied to the transaction (fractional
            value)
        created_at:
          $ref: '#/components/schemas/Timestamp'
        updated_at:
          $ref: '#/components/schemas/Timestamp'
    RateCardKind:
      type: string
      description: >-
        Enumerated rate card strategy where numeric Raast values map to
        constants (0: RateCardKind_unspecified, 1: RateCardKind_variable, 2:
        RateCardKind_fixed, 3: RateCardKind_blend).
      enum:
        - RateCardKind_unspecified
        - RateCardKind_variable
        - RateCardKind_fixed
        - RateCardKind_blend
      example: RateCardKind_fixed
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-SFPY-AGGREGATOR-SECRET-KEY
      in: header

````