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

# List Payments

> Retrieve a list of payments for a merchant.

## Overview

The List Payments endpoint allows you to search and retrieve payment records based on a variety of criteria. You can filter by payment status, date ranges, currency, and more. The response is paginated to handle large datasets efficiently.

## Filtering

You can combine multiple filters to create a precise query. All filter parameters are optional.

### Available Filters

* `payment_id`
* `currency`
* `merchant_id`
* `order_id`
* `reference_id`
* `buyer_name`
* `mop_type`: (e.g., `credit_card`, `debit_card`, `upi`, `net_banking`, `qr`)
* `status`: ( `pending`, `captured`, `failed`)
* `from_created_at` / `to_created_at`


## OpenAPI

````yaml GET /pg/payments/
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/:
    get:
      tags:
        - Payments
      summary: List Payments
      description: Retrieve a list of payments with optional filtering.
      operationId: v1_get_pg_payments_
      parameters:
        - name: currency
          in: query
          description: Filter by 3-letter ISO currency code.
          schema:
            type: string
        - name: merchant_id
          in: query
          description: Filter by merchant ID.
          schema:
            type: string
        - name: payment_id
          in: query
          description: Filter by payment ID.
          schema:
            type: string
        - name: order_id
          in: query
          description: Filter by order ID.
          schema:
            type: string
        - name: reference_id
          in: query
          description: Filter by order reference ID.
          schema:
            type: string
        - name: buyer_name
          in: query
          description: Filter by buyer's name.
          schema:
            type: string
        - name: mop_type
          in: query
          description: Filter by payment mode.
          schema:
            type: string
            enum:
              - upi
              - credit_card
              - debit_card
              - net_banking
              - qr
        - name: status
          in: query
          description: Filter by payment status.
          schema:
            type: string
            enum:
              - pending
              - captured
              - failed
        - name: from_created_at
          in: query
          description: Filter by creation date (from).
          schema:
            type: string
            format: date
        - name: to_created_at
          in: query
          description: Filter by creation date (to).
          schema:
            type: string
            format: date
      responses:
        '200':
          description: A paginated list of payments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ListPaymentsResponse'
              example:
                success: true
                message: Domestic payment requests retrieved successfully
                data:
                  count: 15
                  page: 1
                  page_size: 10
                  next: https://api-pacb.eximpe.com/pg/payments/?page=2&page_size=10
                  previous: null
                  results:
                    - payment_id: PR2024120567891
                      merchant:
                        id: '3604346598'
                        name: InnovateTech Solutions
                      reference_id: ORD_IT_SERVICES_2024_1001
                      buyer:
                        name: Kavya Nair
                        email: kavya.nair@startupventures.in
                        phone: '+919876543201'
                      order_id: OD2024120567891
                      invoice_number: INV2024120567891
                      amount:
                        amount: '45000'
                        total_amount: '45000'
                        currency: INR
                      created_at: '2024-12-05T15:22:18.344135Z'
                      comment: null
                      mop_type: upi
                      status: captured
        '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.
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v1_ListPaymentsResponse:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
          description: Indicates if the request was successful
        message:
          type: string
          description: Response message
        data:
          type: object
          required:
            - count
            - page
            - page_size
            - next
            - previous
            - results
          properties:
            count:
              type: integer
              description: Total number of payments
            page:
              type: integer
              description: Current page number
            page_size:
              type: integer
              description: Number of payments per page
            next:
              type: string
              nullable: true
              description: URL for the next page of results
            previous:
              type: string
              nullable: true
              description: URL for the previous page of results
            results:
              type: array
              items:
                $ref: '#/components/schemas/v1_PaymentInList'
    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_PaymentInList:
      type: object
      required:
        - id
        - merchant
        - reference_id
        - buyer
        - payment_id
        - amount
        - created_at
        - mop_type
        - status
      properties:
        payment_id:
          type: string
          description: Unique payment request identifier
        merchant:
          type: object
          required:
            - id
            - name
          properties:
            id:
              type: string
              description: Merchant ID
            name:
              type: string
              description: Merchant name
        order_id:
          type: string
          description: Order ID
        invoice_number:
          type: string
          description: Invoice number
        reference_id:
          type: string
          description: Order reference identifier
        buyer:
          type: object
          required:
            - name
            - email
            - phone
          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
        amount:
          type: object
          required:
            - amount
            - total_amount
            - currency
          properties:
            amount:
              type: string
              description: Amount in decimal format (e.g., "100.00")
              pattern: ^\d+\.\d{2}$
            total_amount:
              type: string
              description: Total payment amount
            currency:
              type: string
              description: 3-letter ISO currency code
        created_at:
          type: string
          format: date-time
          description: Payment creation timestamp
        comment:
          type: string
          nullable: true
          description: Additional comment or status message
        mop_type:
          type: string
          description: Method of payment
          enum:
            - upi
            - credit_card
            - debit_card
            - net_banking
            - qr
        status:
          type: string
          description: Payment status
          enum:
            - pending
            - captured
            - failed
    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
  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

````