Production-grade Stripe webhooks on Cloudflare Workers + D1 · v1.0.0
POST /api/webhook — Stripe (constructEventAsync + SubtleCrypto)GET /api/health — JSON healthGET /api/admin/events — recent events (header X-Admin-Secret)GET /api/admin/dead-letters — dead lettersPOST /api/admin/replay — replay dead letter {"event_id"}checkout.session.completedcustomer.subscription.updatedcustomer.subscription.deletedinvoice.paidinvoice.payment_failedUnknown event types are safely ignored and acked (200).
Add-on to the Billflare billing spine. Point Stripe Dashboard → Webhooks at /api/webhook.