Skip to main content
POST
/
api
/
webhooks
/
stripe
Stripe Webhook
curl --request POST \
  --url https://api.example.com/api/webhooks/stripe
{
  "received": true
}
Receives and processes Stripe webhook events. This endpoint is called by Stripe, not by client applications.
This endpoint requires a valid stripe-signature header for webhook verification. It is not intended for direct API consumption.

Handled Events

EventAction
checkout.session.completedActivates Pro plan, creates/updates Stripe customer ID
customer.subscription.updatedUpdates subscription status
customer.subscription.deletedDowngrades to Free plan

Idempotency

Each event is logged to the billing_events table with a unique stripe_event_id. Duplicate events (replays) are safely ignored.

Response

{
  "received": true
}

Errors

StatusCause
400Invalid or missing Stripe signature