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

# Find Payment

> Explore a payment in detail.



## OpenAPI

````yaml get /v1/aggregators/{raast-aggregator-id}/payments/{payment-id}
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/{payment-id}:
    parameters:
      - $ref: '#/components/parameters/AggregatorIdParam'
      - $ref: '#/components/parameters/PaymentIdParam'
    get:
      tags:
        - Payments
      summary: Find Payment
      description: Explore a payment in detail.
      responses:
        '200':
          $ref: '#/components/responses/FindPaymentResponse'
      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
    PaymentIdParam:
      name: payment-id
      in: path
      required: true
      schema:
        type: string
        example: pm_2288490a-2176-4de5-b373-0ffb6f8e2e6e
      description: The unique identifier for the payment
  responses:
    FindPaymentResponse:
      description: This response contains details of a payment
      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:
                    $ref: '#/components/schemas/Payment'
          examples:
            PaymentFound:
              value:
                api_version: v1
                data:
                  id: '644'
                  token: pm_f37a10dd-c530-4d86-8483-be473e820578
                  aggregator_id: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
                  aggregator_merchant_id: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                  qr_code_id: qr_503d916b-9ad5-44aa-8d41-1ad656882f7f
                  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
                  instr_id: INSTR-88921
                  end_to_end_id: E2E-09771234
                  pmt_inf_id: 9545TGYRG0F6DCQEF2ZH7UCOCU57FUNYDL9
                  request_id: 6a049190-3595-47cb-8603-7e310c3adb15
                  msg_created_at: '2025-06-27T06:45:35Z'
                  expires_at: '2025-06-27T06:47:34Z'
                  created_at: '2025-06-27T06:45:35Z'
                  updated_at: '2025-06-27T06:48:33Z'
                  txn_logs:
                    - id: '2980'
                      type: PAYMENT_STATUS
                      payment_id: '644'
                      status: P_REJECTED
                      refund_id: rfd_0f4a653e-cc5c-4fe3-9f3c-5b2ec518de66
                      settlement_id: stl_1b9f5df3-ae17-4e56-9c58-0f0c594dfbf4
                      txn_desc: Payment rejected by beneficiary bank.
                      addtl_info: OTP verification failed at issuer bank.
                      token: log_b2cb6f9b-4960-4b58-b0f4-91a2c0d1c177
                      timestamp: '2025-06-27T06:48:33Z'
                      iso_msg_type: pacs.002
                  debitor: null
                  qr_code:
                    id: '148'
                    token: qr_3b4a02f2-4e7b-4de1-90a6-0213767b7b8b
                    aggregator_merchant_id: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                    type: DYNAMIC
                    code: 00020101021226370012PKSAFEPAKISTAN0117PM_f37a10dd
                    terminal_label: TL-839201
                    reference_label: RL-3242
                    is_deleted: false
                    created_at: '2025-06-20T05:44:11Z'
                  aggregator_merchant:
                    id: '92'
                    token: am_749fe6ce-91f9-4f6a-9df2-ec6ae9f75a30
                    name: Lazer Sports
                    aggregator_id: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
                    merchant_id: mer_2cab1524-805d-4a09-8e51-924ddf3f43ea
                    merchant_external_id: lazersports-001
                    bank_account_id: ba_cda15b62-26cc-4ae2-aa4b-4173846c1f18
                    enabled: true
                    created_at: '2025-06-10T07:14:03Z'
                    updated_at: '2025-06-27T06:48:33Z'
                    raast_merchant:
                      id: '501'
                      token: rm_b8a45764-3100-4e1e-90fa-3f918a8dac5d
                      partner_id: partner_4321
                      raast_record_id: RAAST123456
                      status: Active
                      uid_type: NTN
                      uid_value: 1234567-8
                      name: Lazer Sports Pvt Ltd
                      document_type: NTN
                      document_number: 1234567-8
                      address_details:
                        country: PK
                        city: Karachi
                        state_province_region: Sindh
                        address_line: 221B Baker Street
                      contact_details:
                        mobile_number: '+923001112233'
                        email: contact@lazersports.pk
                      additional_details:
                        dba: Lazer Sports
                        mcc: '5411'
                        lat: '24.8607'
                        long: '67.0011'
                      additional_details_private: {}
                      created_at: '2025-04-01T08:21:55Z'
                      updated_at: '2025-06-15T11:12:45Z'
                  refunds: []
                  settlement: null
  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

````