Receive a Stripe Billing event
POST /v1/billing/webhook
Called by Stripe, not by an integration. Verifies Stripe-Signature over the raw body with the secret of the endpoint of the account (not a Connect one), records the event once, and applies it: a checkout completed, a subscription created, updated or deleted, a renewal to add the overage to, an invoice paid or failed, the fiscal data of a customer changed. An event of a connected account is refused with 400 billing_connect_event, an event of the other Stripe mode than the one of the deployment with 400 billing_mode_mismatch. A redelivery of an event already processed answers duplicate: true and does nothing. No API key.
Responses
Section titled “ Responses ”Success.
object
Present only when this event had already been processed. Nothing was done.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: billing_connect_event, billing_mode_mismatch, invalid_body, stripe_signature_invalid.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
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.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: payload_too_large.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
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.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: internal_error.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
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.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.
Error codes: billing_not_configured.
object
object
Machine readable code. The set is per operation; each response below lists the ones it can produce.
The field or header the error is about, when there is one.
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.
Headers
Section titled “Headers ”Identifier of this request. Quote it to support.
The API version this response was produced with.