---
updatedAt: 2026-10-16T12:59:06.000Z
agentTools:
  projectIndex: https://docs.infiniaweb.com/llms.txt
---

# 📄 Pagination

Page through list endpoints with cursor-based pagination, using the limit and cursor parameters.

All list endpoints in the Infinia API use cursor-based pagination. Each response includes a cursor that points to the next page, so results stay consistent and fast no matter how much data your account accumulates.

This page explains the pagination parameters, shows how to walk through every page, and lists the rules a cursor depends on.

## How cursor pagination works

Instead of asking for a page number, you pass back the cursor from the previous response. When there are no more pages, the cursor is `null`.

### Request parameters

| Parameter | Type    | Default | Description                                                                       |
| :-------- | :------ | :------ | :-------------------------------------------------------------------------------- |
| `limit`   | integer | `50`    | Number of records to return, from `1` to `100`.                                   |
| `cursor`  | string  | None    | The `next_cursor` from the previous response. Leave it out to get the first page. |

### Response fields

| Field         | Type             | Description                                                                     |
| :------------ | :--------------- | :------------------------------------------------------------------------------ |
| `data`        | array            | The records on this page.                                                       |
| `next_cursor` | string or `null` | Pass it as `cursor` to get the next page. `null` means there are no more pages. |
| `has_more`    | boolean          | `true` if there are more pages, `false` if this is the last one.                |

[List Payouts](https://docs.infiniaweb.com/reference/v2_list_payouts__get) returns these fields in camelCase, as `nextCursor` and `hasMore`, like the rest of the Payouts API. The request parameters are the same.

Treat the cursor as an opaque string. Don't build or change it yourself.

## Page through results

Send the first request without a cursor:

```bash Request
curl -u "$API_KEY_USER:$API_KEY_PASSWORD" \
  "https://app2test.infiniaweb.com/infinia_api/v1/payments/?limit=50"
```
```json Response
{
  "status": "success",
  "has_more": true,
  "next_cursor": "eyJpZCI6IDEyMzR9",
  "data": [
    {
      "id": "8d1f4b2e-6a3c-4f7e-9b05-2c7a1e9d4f63",
      "status": "COMPLETED",
      "amount": 150.0,
      "currency": "BRL",
      "reference": "order-10045",
      "createdAt": "2026-03-05T09:11:06.917875"
    }
  ]
}
```

Then pass `next_cursor` as `cursor` to get the next page:

```bash
curl -u "$API_KEY_USER:$API_KEY_PASSWORD" \
  "https://app2test.infiniaweb.com/infinia_api/v1/payments/?limit=50&cursor=eyJpZCI6IDEyMzR9"
```

Repeat until `has_more` is `false` and `next_cursor` is `null`. At that point you've fetched every record.

## Keep the same filters on every page

A cursor belongs to one specific result set. Send the same filters on every request of a pagination session, from the first page to the last. If any filter changes, the API rejects the cursor with a `400`. You can change `limit` between pages.

```bash
# First request
GET /payments/?limit=50&status=COMPLETED&dateFrom=2025-01-01T00:00:00Z

# Correct: same filters, plus the cursor
GET /payments/?limit=50&status=COMPLETED&dateFrom=2025-01-01T00:00:00Z&cursor=eyJpZCI6IDEyMzR9

# Wrong: a filter changed
GET /payments/?limit=50&status=AWAITING&dateFrom=2025-01-01T00:00:00Z&cursor=eyJpZCI6IDEyMzR9
```

To apply different filters, start a new pagination session with no cursor.

## Migrate from page\_number and page\_size

The `page_number` and `page_size` parameters are deprecated. On [List Payments](https://docs.infiniaweb.com/reference/v1_list_payments__get), [List Bank Account Validations](https://docs.infiniaweb.com/reference/v1_list_account_identity__get) and [List Identity Validation Requests](https://docs.infiniaweb.com/reference/v1_list_identity_validations__get) they're named `pageNumber` and `pageSize`. Use `limit` and `cursor` instead.

| Deprecated parameter | Replacement |
| :------------------- | :---------- |
| `page_size`          | `limit`     |
| `page_number`        | `cursor`    |

The main difference is that you don't calculate which page to jump to. You follow the `next_cursor` from one response to the next.