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

# Get Payment

> Retrieve one payment with its order, settlement, refunds and method-of-payment details.

## Overview

Returns the full record of one payment: the order it belongs to, the settlement that paid it out, any refunds against it, and details of the method the buyer used. Take the `payment_id` from [List Payments](/api-reference/v3/payment/list) or from a payment webhook.

<Note>
  **PSPs can fetch any payment they can act for**: their own, or any sub-merchant's. `X-Merchant-ID` is not needed here, and does not narrow the lookup.
</Note>

## Payment status

`status` is the payment's status as recorded: `pending`, `captured` or `failed`.

<Note>
  **A pending payment that has expired still reads `pending` here.** [List Payments](/api-reference/v3/payment/list) shows the same payment as `failed`. Treat a `pending` payment whose order has passed its expiry as failed.
</Note>

`order.status` is the order's status, not the payment's: `payment_pending`, `payment_successful` or `failed`. An order can have several payments, one per attempt, so a `failed` payment can belong to a `payment_successful` order.

## Response Fields

* `order.amount` is a decimal string with two places, e.g. `"1500.00"`. The same applies to `settlement.settlement_amount` and `refund[].refund_amount`. Parse them as decimals, never as floats.
* `settlement` is `null` until the payment is settled.
* `refund` lists refunds against the payment, newest first, and is `[]` when there are none. `refund_status` is one of `initiated`, `processing`, `refunded`, `failed`, `reversed`, `on_hold` or `bank_rejected_refund`.
* `collection_mode` is how the payment was collected: `hosted_payment`, `payment_link` or `s2s`.
* `mop_type` and `order.opted_mop_type` are lowercase, e.g. `upi` or `credit_card`. `opted_mop_type` is the method chosen when the order was created; `mop_type` is the one the buyer actually used.
* `mop_detail` depends on `mop_type`:

| `mop_type` | `mop_detail` |
| - | - |
| `upi` | `vpa` |
| `credit_card`, `debit_card` | `card_last_4_digits`, `card_holder_name`, `card_issuer_country`, `card_issuer_bank` |
| `net_banking` | `bank_ref_num`, `acq_id` |
| `qr`, or any other method | `null` |

Any field inside `mop_detail` can be `null` when the payment provider did not return it.

* `created_at`, `payment_completed_at`, `order.created_at`, and the timestamps under `settlement` and `refund`, are UTC with microseconds, e.g. `2026-10-15T06:44:13.414209Z`.

## Errors

A payment ID that does not exist, or belongs to a merchant you cannot act for, returns `404`:

```json theme={null}
{
  "success": false,
  "error": {
    "code": "ERR_PAYMENT_005",
    "message": "Payment not found",
    "details": {
      "payment_id": "Payment not found"
    }
  }
}
```

<Info>
  The response is the same whatever `X-API-Version` you send. v1, v2 and v3 integrations share this endpoint and its response.
</Info>


## OpenAPI

````yaml openapi/v3-payments.json GET /pg/payments/{payment_id}/
openapi: 3.0.3
info:
  title: EximPe Payment Gateway API — v3 Payments
  version: 3.0.0
  description: >-
    List and retrieve payments on the v3 API. v1 and v2 use the same paths and
    return the same response; this spec carries the v3 reference.
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security: []
tags:
  - name: Payments
paths:
  /pg/payments/{payment_id}/:
    get:
      tags:
        - Payments
      summary: Get Payment
      description: >-
        Return one payment with its order, settlement, refunds and
        method-of-payment details.
      operationId: v3_getPayment
      parameters:
        - name: payment_id
          in: path
          required: true
          description: Payment ID, e.g. `PR4350279153`.
          schema:
            type: string
      responses:
        '200':
          description: The payment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_GetPaymentResponse'
              examples:
                UPI, settled and partly refunded:
                  summary: UPI, settled and partly refunded
                  value:
                    success: true
                    message: Domestic payment request details retrieved successfully
                    data:
                      payment_id: PR4350279153
                      order:
                        order_id: OD8196969047
                        reference_id: ORD-2026-000123
                        amount: '1500.00'
                        currency: INR
                        opted_mop_type: upi
                        buyer:
                          name: Rahul Sharma
                          email: rahul.sharma@example.com
                          phone: '+919876543210'
                          address:
                            line_1: 12 MG Road
                            line_2: Indiranagar
                            city: Bengaluru
                            state: Karnataka
                            postal_code: '560038'
                          pan_number: null
                          dob: null
                        product:
                          name: Annual software licence
                          description: 12-month subscription
                          hs_code: '99831000'
                          hs_code_description: Professional, technical and other services
                          type_of_goods: service
                        status: payment_successful
                        status_message: Payment captured successfully
                        created_at: '2026-10-15T06:44:13.101924Z'
                      settlement:
                        id: ST6937597440
                        settlement_id: 67c41a7a-010a-4667-82f2-fb529cdcdbe6
                        settlement_completed_at: '2026-10-16T09:40:58.189094Z'
                        settlement_amount: '17.62'
                        settlement_currency: USD
                        utr_number: UTR2026101600042
                        number_of_transactions: 1
                        created_at: '2026-10-16T09:40:58.199249Z'
                        last_updated_at: '2026-10-16T09:40:58.199249Z'
                      refund:
                        - refund_id: RF7781203345
                          refund_amount: '500.00'
                          refund_status: refunded
                          refunded_at: '2026-10-17T11:02:41.000000Z'
                          message: null
                          payment_id: PR4350279153
                          reference_id: RFD-2026-0007
                          created_at: '2026-10-17T10:58:12.553201Z'
                      collection_mode: hosted_payment
                      mop_type: upi
                      bank_ref_num: '629012345678'
                      mop_detail:
                        vpa: rahul@okhdfc
                      payment_completed_at: '2026-10-15T06:45:02.000000Z'
                      status: captured
                      status_message: null
                      created_at: '2026-10-15T06:44:13.414209Z'
                Card, not yet settled:
                  summary: Card, not yet settled
                  value:
                    success: true
                    message: Domestic payment request details retrieved successfully
                    data:
                      payment_id: PR4636695748
                      order:
                        order_id: OD9373039350
                        reference_id: ORD-2026-000123
                        amount: '1500.00'
                        currency: INR
                        opted_mop_type: credit_card
                        buyer:
                          name: Rahul Sharma
                          email: rahul.sharma@example.com
                          phone: '+919876543210'
                          address:
                            line_1: 12 MG Road
                            line_2: Indiranagar
                            city: Bengaluru
                            state: Karnataka
                            postal_code: '560038'
                          pan_number: null
                          dob: null
                        product:
                          name: Annual software licence
                          description: 12-month subscription
                          hs_code: '99831000'
                          hs_code_description: Professional, technical and other services
                          type_of_goods: service
                        status: payment_successful
                        status_message: Payment captured successfully
                        created_at: '2026-10-15T06:44:13.101924Z'
                      settlement: null
                      refund: []
                      collection_mode: s2s
                      mop_type: credit_card
                      bank_ref_num: '1463805794228025856'
                      mop_detail:
                        card_last_4_digits: '1091'
                        card_holder_name: null
                        card_issuer_country: IN
                        card_issuer_bank: HDFC Bank
                      payment_completed_at: '2026-10-15T06:45:02.000000Z'
                      status: captured
                      status_message: null
                      created_at: '2026-10-15T06:44:13.414209Z'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              examples:
                Missing credentials:
                  summary: Missing credentials
                  value:
                    success: false
                    error:
                      code: ERR_AUTH_000
                      message: Missing credentials
                      details:
                        authentication: Missing credentials.
        '404':
          description: No payment with this ID for your account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              examples:
                Not found:
                  summary: Not found
                  value:
                    success: false
                    error:
                      code: ERR_PAYMENT_005
                      message: Payment not found
                      details:
                        payment_id: Payment not found
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
        - clientAuth: []
          clientSecretAuth: []
          merchantAuth: []
          apiVersionHeader: []
components:
  schemas:
    v3_GetPaymentResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/v3_Payment'
    v3_ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Indicates if the request was successful. Always false for error
            responses.
        error:
          $ref: '#/components/schemas/v3_ErrorDetails'
    v3_Payment:
      type: object
      properties:
        payment_id:
          type: string
          description: Payment ID.
        order:
          $ref: '#/components/schemas/v3_PaymentOrder'
        settlement:
          $ref: '#/components/schemas/v3_PaymentSettlement'
        refund:
          type: array
          description: >-
            Refunds against this payment, newest first. `[]` when there are
            none.
          items:
            $ref: '#/components/schemas/v3_PaymentRefund'
        collection_mode:
          type: string
          description: How the payment was collected.
          nullable: true
          enum:
            - hosted_payment
            - payment_link
            - s2s
            - null
        mop_type:
          type: string
          description: Method of payment, lowercase.
          nullable: true
        bank_ref_num:
          type: string
          description: Bank or network reference for the payment.
          nullable: true
        mop_detail:
          nullable: true
          description: >-
            Details for the method of payment. `null` for QR and any method not
            listed.
          oneOf:
            - title: UPI
              type: object
              properties:
                vpa:
                  type: string
                  description: Payer VPA.
                  nullable: true
            - title: Card
              type: object
              properties:
                card_last_4_digits:
                  type: string
                  description: Last four digits of the card.
                  nullable: true
                card_holder_name:
                  type: string
                  description: Card holder name.
                  nullable: true
                card_issuer_country:
                  type: string
                  description: Issuer country code.
                  nullable: true
                card_issuer_bank:
                  type: string
                  description: Issuing bank.
                  nullable: true
            - title: Net banking
              type: object
              properties:
                bank_ref_num:
                  type: string
                  description: Bank reference number.
                  nullable: true
                acq_id:
                  type: string
                  description: Acquirer ID.
                  nullable: true
        payment_completed_at:
          type: string
          format: date-time
          description: When the payment completed.
          nullable: true
        status:
          type: string
          description: >-
            Payment status as recorded. Unlike List Payments, a pending payment
            past its expiry still reads `pending` here.
          enum:
            - pending
            - captured
            - failed
        status_message:
          type: string
          description: Payment status message.
          nullable: true
        created_at:
          type: string
          format: date-time
          description: When the payment was created, UTC with microseconds.
    v3_ErrorDetails:
      type: object
      required:
        - code
        - message
      properties:
        code:
          description: >-
            Error code (e.g., ERR_ORDER_002). The list endpoint's own failure
            sends a number (40350).
          oneOf:
            - type: string
            - type: integer
        message:
          type: string
          description: Error message
        details:
          description: >-
            What failed. Usually an object keyed by the offending field and
            nested the way the request is (e.g. buyer.address.postal_code), with
            one message per field. A purpose_code refusal sends a single string
            instead.
          oneOf:
            - type: object
              additionalProperties: true
            - type: string
    v3_PaymentOrder:
      type: object
      nullable: true
      properties:
        order_id:
          type: string
          description: Order ID.
        reference_id:
          type: string
          description: Your reference for the order.
        amount:
          type: string
          description: Order amount as a decimal string with two places, e.g. `"1500.00"`.
        currency:
          type: string
          description: ISO 4217 currency code.
        opted_mop_type:
          type: string
          description: Method of payment chosen when the order was created, lowercase.
          nullable: true
        buyer:
          type: object
          nullable: true
          properties:
            name:
              type: string
              description: Buyer name.
            email:
              type: string
              description: Buyer email.
            phone:
              type: string
              description: Buyer phone.
              nullable: true
            address:
              type: object
              nullable: true
              properties:
                line_1:
                  type: string
                  description: Line 1.
                  nullable: true
                line_2:
                  type: string
                  description: Line 2.
                  nullable: true
                city:
                  type: string
                  description: City.
                  nullable: true
                state:
                  type: string
                  description: State.
                  nullable: true
                postal_code:
                  type: string
                  description: Postal code.
                  nullable: true
            pan_number:
              type: string
              description: Buyer PAN, when collected.
              nullable: true
            dob:
              type: string
              description: Buyer date of birth, `YYYY-MM-DD`, when collected.
              nullable: true
        product:
          type: object
          nullable: true
          properties:
            name:
              type: string
              description: Product name.
            description:
              type: string
              description: Product description.
              nullable: true
            hs_code:
              type: string
              description: HS code.
              nullable: true
            hs_code_description:
              type: string
              description: HS code description.
              nullable: true
            type_of_goods:
              type: string
              description: Type of goods.
              nullable: true
        status:
          type: string
          description: Order status.
          enum:
            - payment_pending
            - payment_successful
            - failed
        status_message:
          type: string
          description: Order status message.
          nullable: true
        created_at:
          type: string
          format: date-time
          description: When the order was created.
    v3_PaymentSettlement:
      type: object
      nullable: true
      description: >-
        The settlement that paid this payment out, or `null` until it is
        settled.
      properties:
        id:
          type: string
          description: Settlement ID — `ST` followed by 10 digits.
        settlement_id:
          type: string
          description: Settlement reference.
        settlement_completed_at:
          type: string
          format: date-time
          description: When the settlement completed.
          nullable: true
        settlement_amount:
          type: string
          description: Settled amount as a decimal string with two places.
        settlement_currency:
          type: string
          description: Settlement currency.
        utr_number:
          type: string
          description: UTR of the settlement transfer.
          nullable: true
        number_of_transactions:
          type: integer
          description: Payments in the settlement.
        created_at:
          type: string
          format: date-time
          description: When the settlement was created.
        last_updated_at:
          type: string
          format: date-time
          description: When the settlement was last updated.
    v3_PaymentRefund:
      type: object
      properties:
        refund_id:
          type: string
          description: Refund ID.
        refund_amount:
          type: string
          description: Refunded amount as a decimal string with two places.
        refund_status:
          type: string
          description: Refund status.
          enum:
            - initiated
            - processing
            - refunded
            - failed
            - reversed
            - on_hold
            - bank_rejected_refund
        refunded_at:
          type: string
          format: date-time
          description: When the refund completed.
          nullable: true
        message:
          type: string
          description: Refund status message.
          nullable: true
        payment_id:
          type: string
          description: The payment refunded.
        reference_id:
          type: string
          description: Reference ID of the refund.
          nullable: true
        created_at:
          type: string
          format: date-time
          description: When the refund was created.
  securitySchemes:
    clientAuth:
      type: apiKey
      name: X-Client-ID
      in: header
      description: >-
        **Client Application ID** - Your unique application identifier used to
        authenticate API requests. You can find your Client ID in the Developer
        Settings section of the merchant dashboard.
      x-displayName: Client ID
      x-example: your-client-id
    clientSecretAuth:
      type: apiKey
      name: X-Client-Secret
      in: header
      description: >-
        **Client Secret Key** - Your secret key used alongside the Client ID for
        secure authentication. Keep this confidential and never expose it in
        client-side code. Available in the Developer Settings section of the
        merchant dashboard.
      x-displayName: Client Secret
      x-example: your-client-secret
    apiVersionHeader:
      type: apiKey
      name: X-API-Version
      in: header
      description: >-
        **API Version** - Specifies which version of the API to use (e.g.,
        '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which
        API version your integration uses. Default version information is
        available in the Developer Settings.
      x-displayName: API Version
      x-example: 3.0.0
    merchantAuth:
      type: apiKey
      name: X-Merchant-ID
      in: header
      description: >-
        **Merchant Identifier** - The unique ID for the merchant account. This
        is required for PSP (Payment Service Provider) merchants who manage
        multiple merchant accounts. You can find merchant IDs in the Merchant
        Management section of the dashboard.
      x-displayName: Merchant ID
      x-example: your-merchant-id

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.