Skip to content

Receive a Stripe event (test mode)

POST
/v1/stripe/webhook/test

Called by Stripe, not by an integration. Verifies Stripe-Signature over the raw body, records the event once, and applies it. A redelivery of an event already processed answers duplicate: true and does nothing. A body over one megabyte is refused unread with 413. An event whose reported amount is not the amount the payment asked for is refused whole with 500, so that Stripe delivers it again and nothing is recorded in the meantime. No API key.

Success.

object
received
required
boolean
duplicate

Present only when this event had already been processed. Nothing was done.

boolean
Bookrail-Request-Id
required
string

Identifier of this request. Quote it to support.

Bookrail-Version
required
string

The API version this response was produced with.

Error codes: invalid_body, stripe_signature_invalid.

object
error
required
object
type
required
string
Allowed values: invalid_request authentication permission not_found conflict rate_limit policy_violation payment_required internal
code
required

Machine readable code. The set is per operation; each response below lists the ones it can produce.

string
message
required
string
param

The field or header the error is about, when there is one.

string
fix

What to do next, when there is one thing to do. Present on the errors that are about the state of the deployment rather than about the request.

string
doc_url
required
string
request_id
required
string
Bookrail-Request-Id
required
string

Identifier of this request. Quote it to support.

Bookrail-Version
required
string

The API version this response was produced with.

Error codes: payload_too_large.

object
error
required
object
type
required
string
Allowed values: invalid_request authentication permission not_found conflict rate_limit policy_violation payment_required internal
code
required

Machine readable code. The set is per operation; each response below lists the ones it can produce.

string
message
required
string
param

The field or header the error is about, when there is one.

string
fix

What to do next, when there is one thing to do. Present on the errors that are about the state of the deployment rather than about the request.

string
doc_url
required
string
request_id
required
string
Bookrail-Request-Id
required
string

Identifier of this request. Quote it to support.

Bookrail-Version
required
string

The API version this response was produced with.

Error codes: payment_amount_mismatch.

object
error
required
object
type
required
string
Allowed values: invalid_request authentication permission not_found conflict rate_limit policy_violation payment_required internal
code
required

Machine readable code. The set is per operation; each response below lists the ones it can produce.

string
message
required
string
param

The field or header the error is about, when there is one.

string
fix

What to do next, when there is one thing to do. Present on the errors that are about the state of the deployment rather than about the request.

string
doc_url
required
string
request_id
required
string
Bookrail-Request-Id
required
string

Identifier of this request. Quote it to support.

Bookrail-Version
required
string

The API version this response was produced with.

Error codes: stripe_not_configured.

object
error
required
object
type
required
string
Allowed values: invalid_request authentication permission not_found conflict rate_limit policy_violation payment_required internal
code
required

Machine readable code. The set is per operation; each response below lists the ones it can produce.

string
message
required
string
param

The field or header the error is about, when there is one.

string
fix

What to do next, when there is one thing to do. Present on the errors that are about the state of the deployment rather than about the request.

string
doc_url
required
string
request_id
required
string
Bookrail-Request-Id
required
string

Identifier of this request. Quote it to support.

Bookrail-Version
required
string

The API version this response was produced with.