> ## 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 Payment Links

> Page through your payment links, newest first, with where each one stands.

## Overview

Returns your payment links a page at a time, newest first. Each entry carries the link's `status`, its buyer, its amount and the order behind it.

<Note>
  **PSPs get one list covering every link they can act for** — their own and all their sub-merchants'. `merchant` on each entry says whose it is. `X-Merchant-ID` does not narrow the list.
</Note>

## Query Parameters

| Name        | Type    | Default       | Description                                                                                |
| ----------- | ------- | ------------- | ------------------------------------------------------------------------------------------ |
| `page`      | integer | `1`           | Page number.                                                                               |
| `page_size` | integer | `250`         | Links per page. Values above `1000` are capped at `1000`.                                  |
| `ordering`  | string  | `-created_at` | `created_at`, `last_updated_at` or `payment_completed_at`. Prefix with `-` for descending. |

<Warning>
  **The list takes no filters.** There is no status, date or reference filter, so page through every link and filter on your side. To follow one link, call [Retrieve Payment Link](/api-reference/v3/payment-link/retrieve) with its `link_id`.
</Warning>

## Pagination

`data` wraps the page:

| Field       | Description                                               |
| ----------- | --------------------------------------------------------- |
| `count`     | Total links across all pages                              |
| `page`      | This page's number                                        |
| `page_size` | Links per page                                            |
| `next`      | Full URL of the next page, or `null` on the last one      |
| `previous`  | Full URL of the previous page, or `null` on the first one |
| `results`   | The links on this page                                    |

Follow `next` until it is `null`. A page past the last one is not returned empty — it is refused with a `500`:

```json theme={null}
{
  "success": false,
  "error": {
    "code": 40350,
    "message": "Failed to retrieve domestic payment requests",
    "details": {
      "error": "Invalid page."
    }
  }
}
```

## Link status

| `status`  | Meaning                                                                                   |
| --------- | ----------------------------------------------------------------------------------------- |
| `active`  | Open for payment.                                                                         |
| `paid`    | Paid. This outranks expiry: a paid link reads `paid` even after its `expiry_date` passes. |
| `expired` | Past its `expiry_date`, or deactivated — a deactivated link reads `expired`.              |
| `failed`  | Could not be created, or closed without being paid.                                       |

<Note>
  List returns each link's status as last recorded. [Retrieve Payment Link](/api-reference/v3/payment-link/retrieve) checks an active link for a payment before answering, so right after a payment it can read `paid` before List does.
</Note>

## Response Fields

* `link_id` is the link's ID — what [Retrieve](/api-reference/v3/payment-link/retrieve) and [Deactivate](/api-reference/v3/payment-link/deactivate) take. `payment_id` is the same value, kept for compatibility.
* `amount.amount` and `amount.total_amount` are decimal strings without trailing zeros — `"1500"`, `"2499.5"`. Parse them as decimals, never as floats. `total_amount` adds GST where GST applies; otherwise it equals `amount`.
* `mop_type` is the method the buyer paid with, in lowercase (`upi`, `credit_card`). It is `null` until the link is paid, and can stay `null` after. [Retrieve Payment Link](/api-reference/v3/payment-link/retrieve) gives the same value in uppercase.
* `comment` says why a link failed or closed, when there is a reason to give; otherwise it is `null`.
* `payment_link` is `null` for a link that could not be created.
* `order_id` is the order behind the link (`OD` followed by 10 digits).
* `created_at` is UTC with microseconds, e.g. `2026-09-14T09:30:15.123456Z`.


## OpenAPI

````yaml openapi/v3-payment-links.json GET /pg/payment-links/
openapi: 3.0.0
info:
  title: EximPe Payment Gateway API — v3 Payment Links
  description: >-
    Create, list, retrieve and deactivate payment links on the v3 API. v1 and v2
    use the same paths; this spec carries the v3 contract.
  version: 3.0.0
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security: []
paths:
  /pg/payment-links/:
    get:
      tags:
        - Payment Links
      summary: List Payment Links
      description: Return a paginated list of your payment links, newest first.
      operationId: v3_listPaymentLinks
      parameters:
        - name: page
          in: query
          required: false
          description: >-
            Page number, starting at 1. Stop when `next` is null: a page past
            the last one is refused with a 500.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: page_size
          in: query
          required: false
          description: Links per page. Values above 1000 are capped at 1000.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 250
        - name: ordering
          in: query
          required: false
          description: Sort order. Prefix with `-` for descending.
          schema:
            type: string
            enum:
              - '-created_at'
              - created_at
              - '-last_updated_at'
              - last_updated_at
              - '-payment_completed_at'
              - payment_completed_at
            default: '-created_at'
      responses:
        '200':
          description: A page of payment links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ListPaymentLinksResponse'
              examples:
                One page:
                  summary: One page
                  value:
                    success: true
                    message: Domestic payment link requests retrieved successfully
                    data:
                      count: 3
                      page: 1
                      page_size: 250
                      next: null
                      previous: null
                      results:
                        - payment_id: PR4829301756
                          link_id: PR4829301756
                          payment_link: >-
                            https://api-pacb-uat.eximpe.com/p/Xk3nQ7bT2mWp9vLc4R/
                          merchant:
                            id: '4417290356'
                            name: Acme Exports
                          reference_id: ORD-2026-000123
                          buyer:
                            name: Rahul Sharma
                            email: rahul.sharma@example.com
                            phone: '+919876543210'
                          order_id: OD7712409386
                          invoice_number: INV2026000123
                          amount:
                            amount: '1500'
                            total_amount: '1500'
                            currency: INR
                          created_at: '2026-09-14T09:30:15.123456Z'
                          comment: null
                          mop_type: null
                          status: active
                        - payment_id: PR3390127845
                          link_id: PR3390127845
                          payment_link: >-
                            https://api-pacb-uat.eximpe.com/p/Hq8sVd2Lm5Rt7Yx1Nb/
                          merchant:
                            id: '4417290356'
                            name: Acme Exports
                          reference_id: ORD-2026-000118
                          buyer:
                            name: Priya Nair
                            email: priya.nair@example.com
                            phone: '+919812345678'
                          order_id: OD5503918274
                          invoice_number: INV2026000118
                          amount:
                            amount: '2499.5'
                            total_amount: '2499.5'
                            currency: INR
                          created_at: '2026-09-12T14:05:41.906112Z'
                          comment: null
                          mop_type: upi
                          status: paid
                        - payment_id: PR2076648391
                          link_id: PR2076648391
                          payment_link: >-
                            https://api-pacb-uat.eximpe.com/p/Tz4kWn9Fc3Jp6Qe2Ga/
                          merchant:
                            id: '4417290356'
                            name: Acme Exports
                          reference_id: ORD-2026-000097
                          buyer:
                            name: Arjun Mehta
                            email: arjun.mehta@example.com
                            phone: '+919900112233'
                          order_id: OD8841207735
                          invoice_number: INV2026000097
                          amount:
                            amount: '800'
                            total_amount: '800'
                            currency: INR
                          created_at: '2026-08-30T06:18:09.250487Z'
                          comment: null
                          mop_type: null
                          status: expired
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              examples:
                Invalid credentials:
                  summary: Invalid credentials
                  value:
                    success: false
                    error:
                      code: ERR_AUTH_001
                      message: Invalid credentials
                      details:
                        authentication: Invalid credentials.
        '403':
          description: Payment links are not enabled on the account
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/v3_PermissionDeniedResponse'
                  - $ref: '#/components/schemas/v3_ErrorResponse'
              examples:
                Payment links not enabled:
                  summary: Payment links not enabled
                  description: >-
                    Payment links are not enabled on the account. This body does
                    not use the standard error envelope.
                  value:
                    detail: You do not have permission to perform this action.
        '500':
          description: Internal server error, including a page past the last one
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v3_ErrorResponse'
              examples:
                Page past the end:
                  summary: Page past the end
                  value:
                    success: false
                    error:
                      code: 40350
                      message: Failed to retrieve domestic payment requests
                      details:
                        error: Invalid page.
      security:
        - clientAuth: []
          clientSecretAuth: []
          apiVersionHeader: []
components:
  schemas:
    v3_ListPaymentLinksResponse:
      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 links across all pages
            page:
              type: integer
              description: This page's number
            page_size:
              type: integer
              description: Links per page
            next:
              type: string
              format: uri
              nullable: true
              description: Full URL of the next page, or null on the last page
            previous:
              type: string
              format: uri
              nullable: true
              description: Full URL of the previous page, or null on the first page
            results:
              type: array
              items:
                $ref: '#/components/schemas/v3_PaymentLinkListItem'
    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_PermissionDeniedResponse:
      type: object
      required:
        - detail
      description: >-
        Returned when payment links are not enabled on the account. It does not
        use the standard error envelope.
      properties:
        detail:
          type: string
          description: Why the request was refused
    v3_PaymentLinkListItem:
      type: object
      properties:
        payment_id:
          type: string
          description: The same value as link_id, kept for compatibility
        link_id:
          type: string
          description: The link's ID. Retrieve and Deactivate take it.
        payment_link:
          type: string
          format: uri
          nullable: true
          description: The URL sent to the buyer. Null when the link could not be created.
        merchant:
          type: object
          description: >-
            The merchant the link belongs to. For a PSP: its own account or one
            of its sub-merchants.
          properties:
            id:
              type: string
              description: Merchant ID
            name:
              type: string
              description: Merchant's trade name, or legal name when it has none
        reference_id:
          type: string
          description: Your reference_id from Create Payment Link
        buyer:
          type: object
          properties:
            name:
              type: string
              description: Buyer's full name
            email:
              type: string
              description: Buyer's email address
            phone:
              type: string
              nullable: true
              description: Buyer's phone number, E.164 (e.g. +919876543210)
        order_id:
          type: string
          description: The order behind the link (OD followed by 10 digits)
        invoice_number:
          type: string
          description: The invoice number sent on create
        amount:
          type: object
          properties:
            amount:
              type: string
              description: >-
                Amount to collect, as a decimal string without trailing zeros
                ("1500", "2499.5")
            total_amount:
              type: string
              description: >-
                The amount including GST where GST applies; otherwise equal to
                amount
            currency:
              type: string
              description: Always INR
        created_at:
          type: string
          format: date-time
          description: >-
            When the link was created. UTC, ISO 8601 with microseconds (e.g.
            `2026-09-14T09:30:15.123456Z`).
        comment:
          type: string
          nullable: true
          description: >-
            Why the link failed or closed, when there is a reason to give;
            otherwise null
        mop_type:
          type: string
          nullable: true
          description: >-
            The method the buyer paid with, in lowercase (e.g. upi, credit_card,
            net_banking). Can be null even after the link is paid.
        status:
          type: string
          enum:
            - active
            - paid
            - expired
            - failed
          description: >-
            Where the link stands. `active`: open for payment. `paid`: paid;
            this outranks an expiry that has since passed. `expired`: past its
            expiry_date, or deactivated. `failed`: could not be created, or
            closed without being paid.
    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
  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

````