How to Add Subscriptions Easily
Add subscriptions using Stripe Checkout for the payment page and Stripe Billing for recurring management. Create a subscription product in the Stripe Dashboard, generate a Checkout session, and use webhooks to update user access when payments succeed or fail. Alternatively, Lemon Squeezy handles subscriptions with even less code.
Why this matters
Subscriptions provide predictable recurring revenue — the foundation of a sustainable SaaS business. Monthly Recurring Revenue (MRR) is the most important metric for SaaS growth, and every subscriber you add compounds over time.
What's at stake
A broken subscription flow means lost revenue: failed payments that are not retried, cancellations that are not processed, and users who lose access without explanation. Getting the basics right prevents churn from billing issues.
Step by step.
Create subscription products in Stripe
In the Stripe Dashboard, create a Product with recurring Prices. For example: "Pro Plan" with $29/month and $290/year prices. Stripe handles the billing cycle, invoicing, and payment retry logic.
Set up a checkout flow
Use Stripe Checkout in subscription mode. When a user clicks "Subscribe to Pro," create a Checkout Session with mode: "subscription" and redirect them to the Stripe-hosted page. They enter payment info and Stripe handles the rest.
Listen for webhook events
Set up a webhook endpoint to handle Stripe events: customer.subscription.created (grant access), customer.subscription.deleted (revoke access), invoice.payment_failed (notify user). This keeps your database in sync with Stripe.
Enable the Customer Portal
Activate Stripe's Customer Portal so users can manage their subscription without you building UI: update payment method, switch plans, cancel, and view invoices. It is a few lines of code to redirect to the portal.
Handle failed payments
Stripe's Smart Retries automatically retry failed payments over several days. Configure dunning emails in Stripe settings to notify users about payment failures. Mark subscriptions as "past due" in your app until resolved.
Launch subscription billing with confidence
- Subscription setup verification for your Stripe integration
- Revenue tracking and MRR dashboard
- Churn alerts when subscribers cancel or payments fail
Frequently asked questions.
In your Checkout Session, add trial_period_days: 14 (or any number). Stripe collects payment info but does not charge until the trial ends. If the user cancels during the trial, they are never charged.
Stripe automatically retries failed payments over 3-4 weeks using Smart Retries. You can configure dunning emails to notify users. After all retries fail, the subscription is canceled. You should show an in-app banner prompting users to update their payment method.
Use Stripe's Customer Portal — it handles plan upgrades and downgrades with automatic prorated billing. Alternatively, create a new Checkout Session for the new plan and let Stripe handle the switch.
Yes. Lemon Squeezy supports subscriptions with less setup than Stripe. They handle billing, tax, and customer management. The trade-off is higher fees (5% + $0.50 vs. 2.9% + $0.30) and less customization.