Cursor-based pagination
Used by:payment_links, checkout_sessions, webhook_endpoints, events.
Request
Response
Iterating all pages
Offset-based pagination
Used by:customers (legacy).
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Cursor-based pagination for list endpoints
payment_links, checkout_sessions, webhook_endpoints, events.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of results per page. Min 1, max 100. Default 20. |
starting_after | string | Cursor from the previous page’s nextCursor. Omit for the first page. |
{
"data": [...],
"hasMore": true,
"nextCursor": "cs_01HQXYZ..."
}
| Field | Description |
|---|---|
data | Array of objects for this page |
hasMore | true if there are more results after this page |
nextCursor | Pass this as starting_after to fetch the next page. null when hasMore is false. |
let cursor: string | undefined;
do {
const page = await client.paymentLinks.list({
limit: 100,
starting_after: cursor,
});
for (const link of page.data) {
// process link
}
cursor = page.nextCursor ?? undefined;
} while (cursor);
customers (legacy).
| Parameter | Type | Description |
|---|---|---|
limit | integer | Results per page. Default 20. |
page | integer | Page number, 1-indexed. Default 1. |
email | string | Filter by email address. |
{
"object": "list",
"data": [...],
"total": 142,
"page": 1,
"limit": 20
}