> ## 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 payment details by payment ID.

## Overview

The Get Payment endpoint allows you to retrieve complete payment information including order details, payment status, and transaction data. This is useful for payment tracking and status updates.


## OpenAPI

````yaml GET /pg/payments/{payment_id}/
openapi: 3.0.0
info:
  title: Eximpe Payment Gateway API
  description: >-
    API for payment processing and order management through Eximpe payment
    gateway. This specification includes v1, v2, and v3 API versions.
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security:
  - clientAuth: []
    clientSecretAuth: []
    apiVersionHeader: []
tags:
  - name: Card Tokens
  - name: Merchants
  - name: Orders
  - name: Payment Links
  - name: Payments
  - name: Refunds
  - name: Settlements
  - name: Subscriptions
paths:
  /pg/payments/{payment_id}/:
    get:
      tags:
        - Payments
      summary: Get Payment
      description: Retrieve the details of a specific payment by its ID.
      operationId: v1_get_pg_payments_payment_id_
      parameters:
        - name: payment_id
          in: path
          description: The ID of the payment to retrieve.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The details of the payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_GetPaymentResponse'
              example:
                success: true
                message: Domestic payment request details retrieved successfully
                data:
                  payment_id: PR2099558561
                  order:
                    order_id: OD2024120678912
                    reference_id: ORD_CONSULTING_2024_RC0YKG
                    amount: '12500.00'
                    currency: INR
                    opted_mop_type: upi
                    buyer:
                      name: Amit Khanna
                      email: amit.khanna@consultingfirm.co.in
                      phone: '+919123456780'
                      address:
                        line_1: 701, Business Square, Netaji Subhash Place
                        line_2: Near Pitampura Metro
                        city: New Delhi
                        state: Delhi
                        postal_code: '110034'
                      pan_number: CDEPK9876L
                      dob: '1985-11-28'
                    product:
                      name: Digital Marketing Strategy Consultation
                      description: >-
                        Comprehensive 3-month digital marketing strategy and
                        implementation consultation
                      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: '2025-09-04T09:38:39.819054Z'
                  settlement:
                    id: ST6937597440
                    settlement_id: 67c41a7a-010a-4667-82f2-fb529cdcdbe6
                    settlement_completed_at: '2025-09-04T09:40:58.189094Z'
                    settlement_amount: '976.40'
                    settlement_currency: USD
                    utr_number: cea2ae3a-182c-457a-aa57-fa425000cfb8
                    number_of_transactions: 1
                    created_date: '2025-09-04T09:40:58.199249Z'
                  refund: []
                  collection_mode: hosted_payment
                  mop_type: upi
                  bank_ref_num: OD1729756084-PR2099558561
                  mop_detail:
                    vpa: buyer@payu
                  payment_completed_at: '2025-09-04T09:38:44.000000Z'
                  status: captured
                  status_message: null
                  created_date: '2025-09-04T09:38:43.422672Z'
        '401':
          description: Unauthorized - Invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_AUTH_000
                  message: Missing credentials
                  details:
                    authentication: Missing credentials.
        '404':
          description: Payment not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v1_GetPaymentResponse:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        message:
          type: string
          description: Response message
        data:
          $ref: '#/components/schemas/v1_Payment'
    v1_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/v1_ErrorDetails'
    v1_Payment:
      type: object
      required:
        - payment_id
        - order
        - settlement
        - refund
        - collection_mode
        - mop_type
        - status
        - created_date
      properties:
        payment_id:
          type: string
          description: Unique payment request identifier
        order:
          type: object
          required:
            - order_id
            - reference_id
            - amount
            - currency
            - status
            - created_at
          properties:
            order_id:
              type: string
              description: Unique order identifier
            reference_id:
              type: string
              description: Order reference identifier
            amount:
              type: string
              description: Amount in decimal format (e.g., "100.00")
              pattern: ^\d+\.\d{2}$
            currency:
              type: string
              description: 3-letter ISO currency code
            opted_mop_type:
              type: string
              description: Method of payment type
              enum:
                - upi
                - credit_card
                - net_banking
                - debit_card
                - qr
            buyer:
              type: object
              required:
                - name
                - address
              properties:
                name:
                  type: string
                  description: Buyer's full name
                email:
                  type: string
                  format: email
                  description: Buyer's email address
                phone:
                  type: string
                  description: Buyer's phone number with country code
                address:
                  $ref: '#/components/schemas/v1_Address'
                pan_number:
                  type: string
                  nullable: true
                  description: Buyer's PAN number
                dob:
                  type: string
                  format: date
                  nullable: true
                  description: Buyer's date of birth
            product:
              $ref: '#/components/schemas/v1_Product'
            status:
              type: string
              description: Order status
              enum:
                - payment_pending
                - payment_successful
                - failed
            status_message:
              type: string
              nullable: true
              description: Order status message
            created_at:
              type: string
              format: date-time
              description: Order creation timestamp
        settlement:
          type: object
          nullable: true
          properties:
            id:
              type: string
              description: Settlement ID
            settlement_id:
              type: string
              description: Unique settlement identifier
            settlement_completed_date:
              type: string
              format: date-time
              description: Settlement completion timestamp
            settlement_amount:
              type: number
              format: float
              description: Settlement amount
            settlement_currency:
              type: string
              description: Settlement currency
            utr_number:
              type: string
              description: UTR number for the settlement
            number_of_transactions:
              type: integer
              description: Number of transactions in settlement
            created_date:
              type: string
              format: date-time
              description: Settlement creation timestamp
        refund:
          type: array
          description: Array of refunds associated with this payment
          items:
            $ref: '#/components/schemas/v1_Refund'
        collection_mode:
          type: string
          description: Payment collection mode
          enum:
            - hosted_payment
            - s2s
        mop_type:
          type: string
          description: Method of payment
          enum:
            - upi
            - credit_card
            - debit_card
            - net_banking
            - qr
        bank_ref_num:
          type: string
          nullable: true
          description: Bank reference number
        mop_detail:
          type: object
          nullable: true
          description: >-
            Method of payment specific details - structure varies based on
            mop_type
          oneOf:
            - title: UPI Details
              type: object
              properties:
                upi_id:
                  type: string
                  description: UPI ID for UPI payments
              required:
                - upi_id
            - title: Card Details
              type: object
              properties:
                card_mask:
                  type: string
                  description: Masked card number
                card_holder_name:
                  type: string
                  description: Name of the card holder
                card_issuer_country:
                  type: string
                  description: Country of the card issuer
                card_issuer_bank:
                  type: string
                  description: Bank that issued the card
              required:
                - card_mask
                - card_holder_name
                - card_issuer_country
                - card_issuer_bank
            - title: Net Banking Details
              type: object
              properties:
                bank_ref_num:
                  type: string
                  description: Bank reference number
                acq_id:
                  type: string
                  description: Acquirer ID
              required:
                - bank_ref_num
                - acq_id
        payment_completed_at:
          type: string
          format: date-time
          nullable: true
          description: Payment completion timestamp
        status:
          type: string
          description: Payment status
          enum:
            - pending
            - captured
            - failed
        status_message:
          type: string
          nullable: true
          description: Payment status message
        created_date:
          type: string
          format: date-time
          description: Payment creation timestamp
    v1_ErrorDetails:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code (e.g., ERR_ORDER_002)
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Detailed validation error information with field-specific errors
          additionalProperties:
            type: string
            description: Error message for the specific field
    v1_Address:
      type: object
      required:
        - line_1
        - city
        - state
        - postal_code
      properties:
        line_1:
          type: string
          description: Address line 1
        line_2:
          type: string
          description: Address line 2
        city:
          type: string
          description: City name
        state:
          type: string
          description: State name
        postal_code:
          type: string
          description: Postal/ZIP code
    v1_Product:
      type: object
      required:
        - name
        - type_of_goods
      properties:
        name:
          type: string
          description: Product name
        description:
          type: string
          description: Product description
        hs_code:
          type: string
          description: Harmonized System code, required for physical goods
        hs_code_description:
          type: string
          description: Description of the HS code
        type_of_goods:
          type: string
          description: Type of goods (e.g., physical_goods)
          enum:
            - physical_goods
            - digital_goods
            - service
    v1_Refund:
      type: object
      properties:
        refund_id:
          type: string
          description: Unique identifier for the refund.
        payment_id:
          type: string
          description: The ID of the payment that was refunded.
        refund_status:
          type: string
          description: The status of the refund.
        message:
          type: string
          nullable: true
          description: A message providing more detail about the refund status.
        bank_ref_num:
          type: string
          nullable: true
          description: The bank reference number for the refund.
        refund_amount:
          type: number
          format: float
          description: The refunded amount.
        refunded_at:
          type: string
          format: date-time
          nullable: true
          description: The timestamp of when the refund was completed.
  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

````