
Stripe Subscriptions for SaaS: Setting Up Recurring Payments
A step-by-step guide to Stripe subscriptions: creating products, pricing plans, trial periods and managing the customer lifecycle.
Recurring payments are the backbone of monetisation for SaaS, online courses, membership communities and any subscription-based service. Stripe Billing provides ready-made infrastructure — from plan creation to automated dunning when a charge fails.
Core Stripe Billing concepts
Product — what you're selling (e.g. "Pro Plan").
Price — how much and how often to charge (e.g. $29/month or $290/year).
Customer — a Stripe customer object that subscriptions and payment methods are attached to.
Subscription — an active customer subscription that automatically generates an Invoice at the start of each billing period.
Creating a product and price via API
// Create a product
$product = \Stripe\Product::create([
'name' => 'Pro Plan',
]);
// Create a monthly price
$price = \Stripe\Price::create([
'product' => $product->id,
'unit_amount' => 2900, // $29.00 in cents
'currency' => 'usd',
'recurring' => ['interval' => 'month'],
]);
Trial periods and freemium
Add trial_period_days when creating a subscription to give customers time to evaluate the product. Stripe doesn't charge during the trial and automatically transitions the subscription to active status when it ends.
$subscription = \Stripe\Subscription::create([
'customer' => $customerId,
'items' => [['price' => $priceId]],
'trial_period_days' => 14,
]);
Managing the subscription lifecycle
- Upgrade/Downgrade — change the plan via
Subscription::update()withproration_behavior - Pause — suspend without cancelling (useful for customers with temporary financial difficulty)
- Cancel at period end — cancels at the end of the paid period; customer retains access until then
- Immediate cancel — instant cancellation with optional refund
Dunning — automated payment recovery
When a customer's card is outdated or declined, Stripe Smart Retries automatically retries at the optimal time. Configure an email notification sequence in Billing → Subscriptions → Smart Retries in the Dashboard.
SaaS metrics via Stripe
Stripe automatically calculates key metrics:
- MRR (Monthly Recurring Revenue)
- Churn rate
- Net revenue retention
- Active subscribers
These are available in Revenue Recognition and via API for export to BI systems.
Common subscription setup mistakes
- No Customer Portal configured — customers can't update their card or cancel on their own
- Missing
invoice.payment_failedhandler — customers continue using the service without paying - Incorrect proration calculation when switching plans
If you need help configuring Stripe Billing for your SaaS model — we'll set up the right configuration and provide an account with transaction history.
Готовы подключить Stripe?
Оставьте заявку — расскажем о тарифах, сроках и подберём решение под вашу нишу. Бесплатная консультация эксперта.
