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

> Retrieve order details by order ID.

## Overview

The Get Order endpoint allows you to retrieve complete order information including buyer details, product information, payment status, and timestamps. This is useful for order tracking and status updates.


## OpenAPI

````yaml GET /pg/orders/{order_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/orders/{order_id}/:
    get:
      tags:
        - Orders
      summary: Get Order Details
      description: Retrieve order details by order ID.
      operationId: v1_get_pg_orders_order_id_
      parameters:
        - name: order_id
          in: path
          description: Unique identifier of the order
          required: true
          schema:
            type: string
          example: OD3451762252
      responses:
        '200':
          description: Order retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_GetOrderResponse'
              example:
                success: true
                message: Order fetched successfully
                data:
                  order_id: OD2024120934567
                  reference_id: ORD_BOOKS_2024_3QWD98
                  amount: '1899.00'
                  currency: INR
                  opted_mop_type: upi
                  buyer:
                    name: Vikash Gupta
                    email: vikash.gupta@edupublishers.com
                    phone: '+919456789012'
                    address:
                      line_1: C-45, Sector 62, Institutional Area
                      line_2: Near Metro Station
                      city: Noida
                      state: Uttar Pradesh
                      postal_code: '201309'
                    pan_number: ABCPV1234G
                    dob: '1987-03-15'
                  product:
                    name: Complete Python Programming Course Bundle
                    description: >-
                      Comprehensive online course with 50+ hours of content,
                      projects, and certification
                    hs_code: '49019900'
                    hs_code_description: >-
                      Printed books, brochures, leaflets and similar printed
                      matter
                    type_of_goods: service
                  invoice:
                    number: INV_EDU_20241205
                    date: '2024-12-05'
                    file: https://eximpe.com/invoice_file.pdf
                  air_waybills:
                    - number: AWB23498234
                      file: https://eximpe.com/awb_file.pdf
                  payments:
                    - payment_id: PR3932678387
                      mop_type: upi
                      status: captured
                      status_message: null
                      settlement:
                        status: ready_for_settlement
                        message: null
                        settlement_details:
                          settlement_id: ST8865592169
                          settlement_completed_at: '2025-08-20T20:30:00.212494Z'
                          settlement_currency: USD
                          transaction_amount: '1000.00'
                          merchant_service_fee: '20.00'
                          merchant_service_tax: '3.60'
                          merchant_net_amount: '976.40'
                          sgst: '0.00'
                          cgst: '0.00'
                          igst: '0.00'
                          merchant_transaction_id: OD8967030165-PR3932678387
                          card_type: domestic
                          offer_service_fee: '0.00'
                          offer_service_tax: '0.00'
                          forex_rate: '86'
                          discount: '0.00'
                          additional_tdr_fee: '0.00'
                          additional_tdr_tax: '0.00'
                          total_processing_fee: '0.00'
                          total_service_tax: '0.00'
                          transaction_currency: INR
                      created_at: '2025-08-20T06:13:30.033816Z'
                  status: payment_successful
                  status_message: Payment captured successfully
                  created_at: '2025-08-20T06:13:29.988329Z'
        '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: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_ORDER_001
                  message: Order not found
                  details:
                    order_id: Order not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_SERVICE_ERROR_000
                  message: Payment gateway error
                  details:
                    error: An unexpected error occurred. Please try again later
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v1_GetOrderResponse:
      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_OrderDetails'
    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_OrderDetails:
      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: Unique reference identifier for the order
        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'
        invoice:
          type: object
          properties:
            number:
              type: string
              description: Invoice number
            date:
              type: string
              format: date
              description: Invoice date in YYYY-MM-DD format
            file:
              type: string
              nullable: true
              description: Invoice file URL
        air_waybills:
          type: array
          description: Array of air waybill information
          items:
            type: object
            properties:
              number:
                type: string
                description: Air waybill number
              file:
                type: string
                description: Air waybill file URL
        payments:
          type: array
          description: Array of payment request information
          items:
            $ref: '#/components/schemas/v1_PaymentRequest'
        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
    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_PaymentRequest:
      type: object
      required:
        - payment_id
        - mop_type
        - status
        - created_at
      properties:
        payment_id:
          type: string
          description: Payment request ID
        mop_type:
          type: string
          description: Method of payment type
          enum:
            - upi
            - credit_card
            - net_banking
            - debit_card
            - qr
        status:
          type: string
          description: Payment status
          enum:
            - pending
            - captured
            - failed
            - cancelled
        status_message:
          type: string
          nullable: true
          description: Payment status message
        settlement:
          type: object
          properties:
            status:
              type: string
              description: Settlement status
              enum:
                - pending
                - ready_for_settlement
                - settled
                - failed
            message:
              type: string
              nullable: true
              description: Settlement message
            settlement_details:
              type: object
              nullable: true
              description: Settlement details
        created_at:
          type: string
          format: date-time
          description: Payment request creation timestamp
  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

````