Billing (Stripe)
The template ships one first-class Stripe integration: subscriptions via Checkout + Customer Portal, webhook-driven local state, and an entitlement API the rest of the app calls. There is deliberately no multi-provider abstraction: payment providers differ at the merchant-of-record/legal layer, not the API layer, and an interface that pretends otherwise ships untested adapters. For Paddle or Lemon Squeezy, treat this module as the reference implementation and see Swapping providers.
Billing is optional as a whole. Without STRIPE_SECRET_KEY the module
is dormant: /pricing 404s, the settings section hides and the webhook
route 404s. STRIPE_SECRET_KEY without STRIPE_WEBHOOK_SECRET fails
boot, as does setting any STRIPE_* var without the secret key.
STRIPE_PRO_PRICE_ID is required only if you sell subscriptions, and
STRIPE_LIFETIME_PRICE_ID only if you sell the one-time Lifetime product
(see One-time payments).
Pages
- Stripe dashboard setup
- Billing architecture
- Webhook semantics
- Gating features
- Account deletion
- One-time payments
- Pinned API version
- Webhook internals
- Swapping providers
Related
- Environment Variables:
STRIPE_*,FRONTEND_URL - Architecture: where billing sits in the module graph
- Adding a Module: the conventions this module follows