AbsolutePayDocs

Pagination

One uniform list model — every list returns { items, nextCursor } and pages with limit + before.

Every list endpoint uses the same model. There is one envelope and one way to page — no offset, no page numbers anywhere:

{
  "items": [ /* … */ ],
  "nextCursor": "eyJpZCI6IjAxSlgwUTdBQiIsInRzIjoxNzE5NzkyMDAwMDAwfQ"
}
  • items — this page's rows.
  • nextCursor (response) — an opaque cursor the API returns. Send it back as before to get the next page. When it comes back null, you've reached the last page.
  • limit (query) — caps how many items a page returns.
  • before (query) — the cursor for the next page. Omit it for the first page.
  • order (query) — asc | desc sort direction.

Some settled-history lists (reconciliation, refunds, conversions) additionally return a total alongside items/nextCursor. Small reference lists (networks, templates, options, plans, balances) return everything in one page as { items, nextCursor: null }.

Don't build or parse the cursor

nextCursor is opaque — treat it as a black box. Just echo the exact value back as before. It stays stable even as new items arrive, so you won't skip or double-read rows mid-scan.

Page through everything

let before: string | undefined;
do {
  const page = await ap.checkouts.list({ limit: 50, before, order: "asc" });
  for (const item of page.items) handle(item);
  before = page.nextCursor ?? undefined; // null → stop
} while (before);
before = None
while True:
    page = ap.checkouts.list(limit=50, before=before, order="asc")
    for item in page["items"]:
        handle(item)
    before = page.get("nextCursor")
    if not before:  # null → stop
        break
q := absolutepay.PageQuery{Limit: 50, Order: "asc"}
for {
	page, err := ap.Checkouts.List(ctx, q)
	if err != nil {
		log.Fatal(err)
	}
	for _, item := range page.Items {
		_ = item
	}
	if page.NextCursor == nil {
		break
	}
	q.Before = *page.NextCursor
}
# First page:
curl "https://api.absolutepay.io/v1/checkouts?limit=50" \
  -H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/checkouts?limit=50" "")

# Next page: pass the previous response's nextCursor as ?before=
curl "https://api.absolutepay.io/v1/checkouts?limit=50&before=eyJpZCI6IjAxSlgwUTdBQi…" \
  -H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/checkouts?limit=50&before=eyJpZCI6IjAxSlgwUTdBQi…" "")

Paginated endpoints

Every list below returns { items, nextCursor } and pages with limit + before:

  • GET /v1/checkouts · ap.checkouts.list()
  • GET /v1/invoices · ap.invoices.list()
  • GET /v1/deposits and /v1/deposits/addresses · ap.deposits.list() / ap.deposits.addresses()
  • GET /v1/refunds · ap.refunds.list() — carries total
  • GET /v1/conversions · ap.conversions.list() — carries total
  • GET /v1/reconciliation/payments and /v1/reconciliation/withdrawals — carry total
  • GET /v1/subscriptions · ap.subscriptions.list()
  • GET /v1/giftcards · ap.giftcards.list()
  • GET /v1/offramp/orders · ap.offramp.orders()

Reference lists — GET /v1/balances, /v1/deposits/chains, /v1/payouts/options, /v1/subscription-plans, /v1/giftcards/templates, /v1/offramp/countries, /v1/offramp/banks — use the same shape but return one page with nextCursor: null.

Next

  • Balances & reconciliation — the settled history lists.
  • Payment linksap.checkouts.list(), the list you'll page most often.
  • Errors — a long paged scan should back off on 429 and resume from the same cursor.
  • API reference — each list endpoint's exact params and the nextCursor field.

On this page