v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
billing

Stripe Webhook

Handle Stripe webhook events.

Verifies the Stripe signature, deduplicates by event id, and routes the event to its billing-lifecycle handler. Unprotected (no auth) but signature-verified.

Events handled: checkout.session.completed, invoice.paid, invoice.payment_failed, customer.subscription.deleted / .updated, payment_method.attached / .detached, charge.refunded, customer.deleted, radar.early_fraud_warning.created.

Args: request: Inbound FastAPI request carrying the raw Stripe payload. stripe_signature: Value of the stripe-signature header.

Returns: {"status": "success"} once the event is processed.

Raises: HTTPException: 500 when the webhook secret is unconfigured or processing fails; 400 for an invalid signature.

post/billing/stripe-webhook

Headers

stripe-signaturestring nullable

Response

Successful Response

object required