Stripe integration, subscriptions, and billing flows. This is the pack-billing-stripe pack.
RESEND_API_KEY is set, the pack sends receipts; otherwise it skips email.From the Stripe dashboard, grab:
STRIPE_SECRET_KEY) from API Keys.STRIPE_WEBHOOK_SECRET) from Webhooks, or create one locally with the Stripe CLI (below).The pack exposes a Stripe webhook receiver at:
POST /checkout/webhook
In production, create a webhook endpoint in Stripe pointing at https://yourdomain.com/checkout/webhook, subscribe to the events the pack handles (checkout, subscription, customer), and copy the signing secret into STRIPE_WEBHOOK_SECRET.
Stripe can't reach localhost over the internet, so use the Stripe CLI to forward events. Install it from stripe.com/docs/stripe-cli, then:
stripe listen --forward-to localhost:3000/checkout/webhook
The CLI prints a whsec_... signing secret. Put it in STRIPE_WEBHOOK_SECRET.
| Variable | Purpose |
|---|---|
STRIPE_SECRET_KEY | Stripe API secret key |
STRIPE_WEBHOOK_SECRET | Signing secret for the webhook endpoint |
RESEND_API_KEY | Optional. Enables receipt emails |