Pagination
Lists return a page at a time, newest first unless you sort otherwise.
| Parameter | Meaning |
|---|---|
limit |
Items per page: 50 by default, up to 200 |
cursor |
Where to continue: the next_cursor of the page before |
sort |
The field to sort by, - first for descending (-created_at). Each list names the fields it sorts by |
q |
Search: each list names what it searches |
Each list also has its own filters, such as status or wallet_id: see the
API reference.
curl "https://api.catholicpay.example/api/v1/merchant/checkouts?limit=100&status=PAID" \ -H "Authorization: Bearer $CATHOLICPAY_SECRET_KEY"{ "data": [ … ], "meta": { "pagination": { "limit": 100, "has_more": true, "next_cursor": "eyJ…" } }}While has_more is true, ask again with cursor set to next_cursor.
Cursors are opaque: pass them back exactly as you got them. Pages stay
consistent while you page, even when new items arrive.
let cursor;do { const url = new URL('https://api.catholicpay.example/api/v1/merchant/checkouts'); url.searchParams.set('limit', '200'); if (cursor) url.searchParams.set('cursor', cursor); const res = await fetch(url, { headers: { Authorization: `Bearer ${key}` } }); const { data, meta } = await res.json(); for (const checkout of data) handle(checkout); cursor = meta.pagination.has_more ? meta.pagination.next_cursor : undefined;} while (cursor);Account and wallet history pages up to 100 entries at a time, with the same
cursor.