> ## Documentation Index
> Fetch the complete documentation index at: https://docs-openpay.nipuntheekshana.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Payments

> Retrieve a paginated list of payments with optional filters

## Authentication

This endpoint requires a **Bearer token** in the `Authorization` header.

```
Authorization: Bearer <your_jwt_token>
```

## Query Parameters

<ParamField query="page" type="integer" default="1">
  The page number for pagination.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  The number of payments per page. Maximum value is `100`.
</ParamField>

<ParamField query="status" type="string">
  Filter by payment status. Accepted values: `initiated`, `pending`, `confirming`, `paid`, `failed`, `expired`.
</ParamField>

<ParamField query="fromDate" type="string">
  Filter payments created on or after this ISO 8601 date (e.g., `2026-01-01`).
</ParamField>

<ParamField query="toDate" type="string">
  Filter payments created on or before this ISO 8601 date (e.g., `2026-03-31`).
</ParamField>

## Response

<ResponseField name="payments" type="array">
  An array of payment objects.
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata.

  <Expandable title="pagination fields">
    <ResponseField name="page" type="integer">
      Current page number.
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Number of items per page.
    </ResponseField>

    <ResponseField name="total" type="integer">
      Total number of matching payments.
    </ResponseField>

    <ResponseField name="totalPages" type="integer">
      Total number of pages.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://olp-api.nipuntheekshana.com/v1/payments?page=1&limit=10&status=paid&fromDate=2026-03-01" \
    -H "Authorization: Bearer <your_jwt_token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "payments": [
      {
        "id": "pay_abc123def456",
        "status": "paid",
        "amount": 25.00,
        "currency": "USD",
        "cryptoAmount": "25.032500",
        "description": "Order #1234 - Premium Plan",
        "customerEmail": "customer@example.com",
        "paidAt": "2026-03-26T14:55:12Z",
        "createdAt": "2026-03-26T14:30:00Z"
      },
      {
        "id": "pay_xyz789ghi012",
        "status": "paid",
        "amount": 5000.00,
        "currency": "LKR",
        "cryptoAmount": "16.750000",
        "description": "Invoice #5678",
        "customerEmail": null,
        "paidAt": "2026-03-25T10:12:45Z",
        "createdAt": "2026-03-25T09:45:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 47,
      "totalPages": 5
    }
  }
  ```
</ResponseExample>
