Pagination
Every list paginates by cursor. There is no page or offset.
curl -s "$BASE/v1/payments?limit=25" -H "x-api-key: $KEY"{ "data": [ "…" ], "has_more": true, "next_cursor": "MjAyNi0wOC0zMFQxOTowNDowMS44MTJafDg5OTIwNDAx"}Pass next_cursor as ?cursor= for the next page, and stop when has_more
is false.
Parameters
Section titled “Parameters”| Parameter | Default | Maximum | Notes |
|---|---|---|---|
limit |
25 |
100 |
An invalid or out-of-range value is silently adjusted, it does not error |
cursor |
— | — | Opaque. Do not build it or interpret it |
Response fields
Section titled “Response fields”| Field | What it is |
|---|---|
data |
The rows on this page |
has_more |
true if there is at least one more page |
next_cursor |
The cursor for the next page. null when has_more is false |
Paginated endpoints
Section titled “Paginated endpoints”| Endpoint | Order | Cursor |
|---|---|---|
GET /v1/payments |
created_at descending |
Keyset on (created_at, id) |
GET /v1/beneficiaries |
created_at descending |
Keyset on (created_at, id) |
GET /v1/events |
id descending |
The event’s numeric id |
GET /v1/payouts/banks does not paginate: it returns the method’s full
catalog.
The cursor points to the last row you took, not to a position: you can keep paying out while you paginate without duplicated or skipped rows.
Walking an entire list
Section titled “Walking an entire list”CURSOR=""while :; do RESP=$(curl -s "$BASE/v1/payments?status=settled&limit=100&cursor=$CURSOR" -H "x-api-key: $KEY") echo "$RESP" | jq -c '.data[]' [ "$(echo "$RESP" | jq -r .has_more)" = "true" ] || break CURSOR=$(echo "$RESP" | jq -r .next_cursor)doneFilter on the server (status, from, to, beneficiaryId) before
paginating: fewer pages against your
rate limit.