Recent Stripe webhook events
const url = 'https://api.sloose.com/billing/admin/events?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.sloose.com/billing/admin/events?limit=50' \ --header 'Authorization: Bearer <token>'Backoffice route: a staff session, or ADMIN_TOKEN; never a customer’s session. The webhook log, newest first by when Stripe made each event, a page at a time (limit and cursor, answering nextCursor) — what arrived, whether it was processed, and the error if it was not.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”How many to return, at most 500; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.
Example
50How many to return, at most 500; 50 when absent. Anything but a whole number above zero — 0, negative, a fraction, not a number — is the default, never an error.
The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (createdAt, id) order, and a malformed one is 400 INVALID_CURSOR.
The nextCursor of the page before this one; absent for the first page. Opaque: it names a place in the list’s (createdAt, id) order, and a malformed one is 400 INVALID_CURSOR.
Responses
Section titled “Responses”A page of the webhook log.
object
object
When Stripe made it: the list’s order, never rewritten.
When its latest attempt began: rewritten when a failed or stuck event is tried again, so it is not the list’s order.
Pass as cursor for the next page; null when this was the last.
Examplegenerated
{ "events": [ { "id": "example", "type": "example", "status": "example", "orgId": "example", "error": "example", "createdAt": "example", "receivedAt": "example", "processedAt": "example" } ], "nextCursor": "example"}cursor is malformed (code: INVALID_CURSOR).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The restore switch is on (code: MAINTENANCE): every route but /health and /robots.txt is refused before anything is read, except the operator’s own POST /staff/people/{id}/delete with the ADMIN_TOKEN. Sloose is down for maintenance. Please try again in a few minutes.
object
Example
{ "code": "MAINTENANCE"}Headers
Section titled “Headers”Seconds until asking again is worth it (300 while the switch is on).