> This page is for version v2 (default).
> For other versions, use one of these documentation indexes:
> - v2 (default): https://developers-beta.clearpay.co.uk/v-2/llms.txt
> - v1: https://developers-beta.clearpay.co.uk/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers-beta.clearpay.co.uk/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers-beta.clearpay.co.uk/_mcp/server.

# Pagination

Merchants can add a new parameter called includeNextLink to the existing List Payment API v1 and v2.

## Query Parameters

| Parameter         | Type    | Description                                                                                                       |
| :---------------- | :------ | :---------------------------------------------------------------------------------------------------------------- |
| `includeNextLink` | boolean | Will return a modified pagination object which includes a url to return the next page. The default value is false |

## Response

The returned pagination object will include nextPageUrl

| Parameter      | Type    | Description                                                        |
| :------------- | :------ | :----------------------------------------------------------------- |
| `limit`        | integer | The number of results that this page was limited to.               |
| `nextPageUrl`  | string  | A url to return the next page (empty if there are no more results) |
| `totalResults` | integer | The total number of results matching the given criteria            |
| `results`      | array   | A page of matching results. This may be a subset of the total.     |

## Example Request

```curl
curl http://api.qa.paylater-beta.net/v2/payments?includeNextLink=true \
  -H 'Authorization: Basic <Base64EncodedCredentials>' \
  -H 'User-Agent: <MyUserAgent>' \
  -H 'Accept: application/json'
```

## Example Response

```json
{
  "totalResults": 210,
  "limit": 20,
  "nextPageUrl":     "http://api.qa.paylater-beta.net/v2/payments?cursor=MjAyMTExMDlUMDUzNTI1LjI1Nlo%3D%3AMDAxLjVuNDhzbm1qNTh0ZzFkZmcwMzR2cGV2ZG1zY2ZiaTllZmVqMzRkMjl1c25mbDVnbg%3D%3D&includeNextLink=true", 
  "results": [
    ...
  ]
}
```