Stripe
Stripe Checkout for one-time prepaid credit packs; webhooks confirm payment and grant credits.
Used for
- Hosted Checkout sessions (card payments; amounts from configured price IDs, not the client)
- Webhooks:
checkout.session.completedand async payment success → credit grant (idempotent by session id)
Auth (env vars)
STRIPE_SECRET_KEY— server API callsSTRIPE_WEBHOOK_SECRET— verifystripe-signatureon raw webhook bodySTRIPE_PRICE_STARTER,STRIPE_PRICE_POPULAR,STRIPE_PRICE_PRO— price IDs per pack
Also uses WEB_BASE_URL for success/cancel redirect URLs.
Notes
- Webhook route has no Firebase auth; only signature verification.
- Stripe env is optional at boot; billing routes error when not configured.
- Setup script can create products, prices, and webhook endpoint for a stage.