Skip to content

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.completed and async payment success → credit grant (idempotent by session id)

Auth (env vars)

  • STRIPE_SECRET_KEY — server API calls
  • STRIPE_WEBHOOK_SECRET — verify stripe-signature on raw webhook body
  • STRIPE_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.

Sophia AI Interview Platform — Internal Documentation