# Stripe Subscription Billing (/en/docs/billing/stripe/subscription)

- [Configure subscription billing](/en/docs/billing/stripe/subscription/configure)

- [Test subscription billing](/en/docs/billing/stripe/subscription/test)

- [Subscription lifecycle and access](/en/docs/billing/stripe/subscription/lifecycle)

Offer monthly or yearly subscriptions through Stripe. Customers sign in, check
out, and manage billing in the customer portal.

| Fact           | Value                                                                                                                                                                  |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Checkout       | Signed in only; the server rejects anonymous recurring Checkout                                                                                                        |
| Billing period | Monthly or yearly; the Stripe Price sets the cadence                                                                                                                   |
| Access         | Stored `active` or `trialing` subscriptions                                                                                                                            |
| Portal         | Stripe customer portal: payment methods, invoices and cancellation; [plan changes require configuration](https://docs.stripe.com/customer-management/configure-portal) |
| Test command   | `./coremvp e2e billing:subscription`                                                                                                                                   |

Map the monthly Price, and the yearly Price if you sell it, for each plan in
ignored `.env.local`:

```dotenv title=".env.local" interactive=true
PAYMENT_PROVIDER=stripe
NEXT_PUBLIC_STRIPE_MODE=test
NEXT_PUBLIC_STRIPE_PRO_PRICE_ID_MONTHLY=price_replace_me
NEXT_PUBLIC_STRIPE_PRO_PRICE_ID_YEARLY=price_replace_me
```

Keep plan names, displayed amounts and features in `src/config/pricing.config.ts`.
All catalog inputs are in
[Stripe Environment Variables](/en/docs/billing/stripe/environment-variables).
