Core

Pagination

Cursor-based pagination on every list endpoint.

List endpoints use cursor-based pagination. Pass starting_after (or ending_before) with the ID of the last record. Cursors are stable across page sizes.

bash
curl "https://sandbox-api.key2pays.com/v1/payments?limit=50&starting_after=pay_3a9X" \
  -H "Authorization: Bearer sk_test_51N8mP...exampleK3Y"
json
{
  "data": [ { "id": "pay_3aA0", "…": "…" }, /* … */ ],
  "has_more": true,
  "next_cursor": "pay_3aB7"
}