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

> Retrieve a paginated list of payments made against a QR code



## OpenAPI

````yaml get /v1/aggregators/{raast-aggregator-id}/qrs/{qr-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}/qrs/{qr-id}/payments:
    parameters:
      - $ref: '#/components/parameters/AggregatorIdParam'
      - $ref: '#/components/parameters/QRIdParam'
    get:
      tags:
        - QRs
      summary: List payments
      description: Retrieve a paginated list of payments made against a QR code
      parameters:
        - $ref: '#/components/parameters/QRPaymentListLimitParam'
        - $ref: '#/components/parameters/QRPaymentListOffsetParam'
      responses:
        '200':
          $ref: '#/components/responses/ListPaymentsForQRCodeResponse'
      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
    QRIdParam:
      name: qr-id
      in: path
      required: true
      schema:
        type: string
        example: qr_7e26f9be-f59d-4025-8e17-9fc398d16230
      description: The unique identifier for the QR code
    QRPaymentListLimitParam:
      name: limit
      in: query
      required: false
      description: Maximum number of payments to return for the QR code.
      schema:
        type: string
        example: '10'
      example: '10'
    QRPaymentListOffsetParam:
      name: offset
      in: query
      required: false
      description: Number of payments to skip before starting the result set.
      schema:
        type: string
        example: '0'
      example: '0'
  responses:
    ListPaymentsForQRCodeResponse:
      description: This response returns the dynamic QR payments for the requested QR code.
      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: Container for the payments returned for the QR code.
                    properties:
                      payments:
                        type: array
                        description: Payments referencing the QR code.
                        items:
                          $ref: '#/components/schemas/Payment'
                      count:
                        type: string
                        description: Total number of payments matching the filters
                        example: '7'
                    required:
                      - payments
                required:
                  - data
          examples:
            QRPayments:
              $ref: '#/components/examples/ListQRPayments'
  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
  examples:
    ListQRPayments:
      description: Example response when listing payments tied to a QR code
      value:
        api_version: v1
        data:
          payments:
            - id: '631'
              token: pm_3442e2b7-caec-4d63-bbed-f443aa9b8237
              aggregator_merchant_id: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
              qr_code_id: qr_d47b3462-4208-40f1-9994-e7bf8b8a16d8
              order_id: SCB200
              type: DYNAMIC_QR
              amount: '20000'
              status: P_REJECTED
              uetr: a66171ef-b247-4cdf-971e-886d45d2b9a0
              trace_reference: 90c4831d-e6d7-491e-a5f9-5f92c7cd1073
              msg_id: H1KMBBKXMARBF3EEP5HATG27BHIAZ3GIH2J
              instr_id: 1b548b244d094b83b30e0791367bc7ce
              end_to_end_id: a66171efb2474cdf971e886d45d2b9a0
              pmt_inf_id: WLJAG10SD4YYFQTQQ2XPJAV8OIG0NAPJR62
              request_id: 144bf8a6-9c20-4082-805f-fe2648860db5
              msg_created_at: '2025-06-26 08:32:42.'
              expires_at: '2025-06-26T11:32:42Z'
              created_at: '2025-06-26T08:32:42Z'
              updated_at: '2025-06-26T11:33:57Z'
              txn_logs: []
              debitor: null
              qr_code: null
              aggregator_merchant: null
              refunds: []
              settlement: null
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-SFPY-AGGREGATOR-SECRET-KEY
      in: header

````