Lists and pagination

Every list reads the same way. Stable pages, combinable filters, and logs in order.

Resource lists

Payouts, pay-ins, customers, beneficiaries, and the rest are returned newest first, in pages:

{
  "data": [ { "id": "pout_01m3sgb0..." }, { "id": "pout_01m3sga9..." } ],
  "has_more": true,
  "next_cursor": "pout_01m3sga9..."
}
ParameterWhat it does
limitHow many per page: 1 to 100. Defaults to 25.
starting_afterThe next_cursor from the previous page.

Keep requesting while has_more is true:

let cursor;
do {
  const url = new URL("https://api-sandbox.caibopay.app/v1/payouts");
  url.searchParams.set("limit", "100");
  if (cursor) url.searchParams.set("starting_after", cursor);
  const page = await fetch(url, { headers: { Authorization: `Bearer ${key}` } }).then((r) => r.json());
  for (const payout of page.data) handle(payout);
  cursor = page.has_more ? page.next_cursor : undefined;
} while (cursor);

A full pass returns exactly once every item that existed when you started, even if others are created while you paginate.

Filters

FilterExample
status?status=completed
created_after (inclusive)?created_after=2026-10-01T00:00:00Z
created_before (exclusive)?created_before=2026-11-01T00:00:00Z
Relations?beneficiary_id=ben_…, ?customer_id=cus_…, ?funding_account_id=fa_…
  • Filters are combined with AND.
  • Dates are in RFC 3339. Encode the + of a time zone offset as %2B.
  • A value the filter doesn't accept responds 400 with param set to the filter's name.
  • A well-formed id that isn't yours returns an empty list.

Logs: events and entries

GET /v1/events and GET /v1/balances/{currency}/entries page with after, never skipping or repeating. Events read oldest first; balance entries newest first.

ParameterWhat it does
limit1 to 100. Defaults to 50.
afterThe next_cursor from your last read.

For events, next_cursor is always present, even on an empty page. Store it and query again from there: that way you never skip an event. See Events.

Sur cette page