Pagination
How cursor-based pagination works across all Access API list endpoints.
All list endpoints use cursor-based pagination for consistent, efficient traversal of large datasets.
How It Works
Every list response includes:
{
"data": [...],
"has_more": true,
"next_cursor": "id_01HABC..."
}| Field | Description |
|---|---|
data | Array of results for the current page |
has_more | true if more results exist beyond this page |
next_cursor | Pass this as the cursor parameter to get the next page |
Fetching Pages
curl "https://api.tryaccess.xyz/api/v1/transactions?limit=20" \
-H "x-api-key: sk_..."curl "https://api.tryaccess.xyz/api/v1/transactions?cursor=txn_01HABC...&limit=20" \
-H "x-api-key: sk_..."Continue until has_more is false.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
cursor | string | — | Cursor from a previous response |
limit | number | 20 | Results per page (1–100) |
Endpoints Using Pagination
GET /api/v1/customersGET /api/v1/transactionsGET /api/v1/subscriptionsGET /api/v1/invoicesGET /api/v1/checkout/sessionsGET /api/v1/webhooks/eventsGET /api/v1/crypto/paymentsGET /api/v1/crypto/payouts
Example: Fetch All Customers
let cursor: string | undefined;
const allCustomers = [];
do {
const params = new URLSearchParams({ limit: "100" });
if (cursor) params.set("cursor", cursor);
const res = await fetch(
`https://api.tryaccess.xyz/api/v1/customers?${params}`,
{ headers: { "x-api-key": "sk_..." } }
);
const { data, has_more, next_cursor } = await res.json();
allCustomers.push(...data);
cursor = has_more ? next_cursor : undefined;
} while (cursor);Ordering
Results are ordered by createdAt descending (newest first) by default. This ordering is consistent across pages.
How is this guide?