Reading Webhooks & Pagination Docs
5 exercises on reading webhook and pagination docs — cursor vs offset paging, webhook payloads, signature verification, retries and idempotency.
Key patterns
- Cursor paging passes back an opaque
next_cursor; offset paging skips N then takeslimit X-Signature(HMAC) lets you verify a webhook is genuine before trusting it- Return
2xxfast or the provider retries with exponential backoff - Idempotent handling: de-duplicate using the stable event id
0 / 5 completed
1 / 5
Read this cursor-pagination note:
Listing endpoints return at most 50 items plus a
cursor:
{
"data": [ ... ],
"next_cursor": "eyJpZCI6MTAyfQ",
"has_more": true
}
To fetch the next page, repeat the request with
?cursor=<next_cursor>. When has_more is false,
next_cursor is null.How do you fetch the second page of results?Cursor pagination uses an opaque token, not page numbers.
The response hands you a
The response hands you a
next_cursor. To advance, you send it back as ?cursor=<next_cursor>. The cursor is an opaque string (often base64) that encodes "where you left off" — you should not parse or invent it.- has_more — boolean flag: keep paging while
true; stop whenfalse(thennext_cursorisnull). - Why cursors? Unlike
page=2(offset paging), cursors stay correct even when new rows are inserted mid-iteration, avoiding skipped or duplicated items.
Next up: More Reading exercises →