Webhooks
POST /api/v1/billing/webhook
Stripe sends webhook events to this endpoint. The portal validates the Stripe signature and updates subscriptions and invoices accordingly.
You do not call this endpoint directly; configure it as the webhook target in the Stripe dashboard.
Events handled
checkout.session.completedcustomer.subscription.updatedcustomer.subscription.deletedinvoice.paidinvoice.payment_failed
Signature verification
The endpoint uses theSTRIPE_WEBHOOK_SECRET environment variable to verify event signatures. Unverified events are rejected with 400 Bad Request.
Local development
For local testing, Stripe CLI can forward events tohttp://localhost:3000/api/v1/billing/webhook.