Skip to content

Recent Stripe webhook events

GET
/billing/admin/events
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.

limit

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.

string
Example
50

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.

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.

string

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.

A page of the webhook log.

Media typeapplication/json
object
events
required
Array<object>
object
id
required
string
type
required
string
status
required
string
orgId
required
string | null
error
required
string | null
createdAt
required

When Stripe made it: the list’s order, never rewritten.

string
receivedAt
required

When its latest attempt began: rewritten when a failed or stuck event is tried again, so it is not the list’s order.

string
processedAt
required
string | null
nextCursor
required

Pass as cursor for the next page; null when this was the last.

string | null
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed value: MAINTENANCE
Example
{
"code": "MAINTENANCE"
}
Retry-After
integer

Seconds until asking again is worth it (300 while the switch is on).

Report a problem with this page

sloose.com