> ## Documentation Index
> Fetch the complete documentation index at: https://eximpe.mintlify.site/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 openapi.json 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
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api-staging.eximpe.com
    description: Staging server
  - url: https://api.eximpe.com
    description: Production server
security:
  - clientAuth: []
    clientSecretAuth: []
paths:
  /pg/payments/{payment_id}/:
    get:
      tags:
        - Payments
      summary: Get Payment
      description: Retrieve the details of a specific payment by its 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/GetPaymentResponse'
              example:
                success: true
                message: Domestic payment request details retrieved successfully
                data:
                  payment_id: PR3828502708
                  order:
                    order_id: OD6530655496
                    reference_id: TEST_9P81ZL
                    amount: 1000
                    currency: INR
                    mop_type: UPI
                    buyer:
                      name: John Doe
                      email: john.doe@example.com
                      phone: '+919876543210'
                      address:
                        line_1: 123 Main Street
                        line_2: Apt 4B
                        city: City
                        state: State
                        postal_code: '123456'
                      pan_number: BNYPG1231L
                      dob: '2025-06-19'
                    product:
                      name: Sample Product
                      description: This is a sample product description
                      hs_code: '98051000'
                      hs_code_description: Portable automatic data processing machines
                      type_of_goods: goods
                    status: payment_successful
                    status_message: Payment captured successfully
                    created_at: '2025-06-19T09:17:56.338741Z'
                  settlement:
                    id: ST4353980017
                    settlement_id: d42eda3f-41b6-4d82-add5-2665181f9eea
                    settlement_completed_date: '2025-06-20T08:06:59.293548Z'
                    settlement_amount: 1000
                    settlement_currency: USD
                    utr_number: 092dc30a-4f19-4318-9798-ad08b48801f6
                    number_of_transactions: 1
                    created_date: '2025-06-20T08:06:59.307056Z'
                  refund:
                    - refund_id: RF8370660295
                      refund_amount: 12
                      refund_status: INITIATED
                      refunded_at: null
                      message: No action status found
                      payment_id: PR3828502708
                  collection_mode: HOSTED_PAYMENT
                  mop_type: UPI
                  bank_ref_num: OD6530655496-PR3828502708
                  mop_detail:
                    upi_id: pay@payu
                  payment_completed_at: '2025-06-19T14:48:11.000000Z'
                  status: CAPTURED
                  status_message: Invoice and AWB file missing
                  created_date: '2025-06-19T09:18:10.637579Z'
        '401':
          description: Unauthorized - Invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Payment not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientAuth: []
          clientSecretAuth: []
components:
  schemas:
    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/Payment'
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        error:
          $ref: '#/components/schemas/ErrorDetails'
    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: number
              format: float
              description: Order amount
            currency:
              type: string
              description: 3-letter ISO currency code
            mop_type:
              type: string
              description: Method of payment type
              enum:
                - UPI
                - CREDIT_CARD
                - NETBANKING
                - 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/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/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/Refund'
        collection_mode:
          type: string
          description: Payment collection mode
          enum:
            - HOSTED_PAYMENT
            - DIRECT_PAYMENT
        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
    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
    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
    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
        hs_code_description:
          type: string
          description: Description of the HS code
        type_of_goods:
          type: string
          description: Type of goods (e.g., goods)
          enum:
            - goods
            - services
    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 app ID. You can find your app id in the merchant dashboard.
    clientSecretAuth:
      type: apiKey
      name: X-Client-Secret
      in: header
      description: Client secret key. You can find your secret in the merchant dashboard.

````