Back to all terms
Payment
Paymentsintermediate

Subscription Billing (Stripe)

Managing recurring payment cycles using Stripe's Subscription and Price APIs, including plan creation, billing intervals, upgrades/downgrades, and lifecycle event handling.

Also known as: recurring billing, Stripe subscriptions, recurring payments, subscription management

Description

Stripe's subscription billing system revolves around Products, Prices, and Subscriptions. A Product represents what you sell (e.g., 'Pro Plan'), a Price defines how much and how often to charge (e.g., $29/month), and a Subscription ties a Customer to one or more Prices with a specific billing cycle. Subscriptions automatically generate Invoices at each billing period, attempt payment collection, and emit webhook events for every state transition. Your application should treat these webhook events as the source of truth for subscription status rather than polling the API.

Subscription statuses follow a defined lifecycle: incomplete (initial payment pending), active, past_due (payment failed but retrying), unpaid (retries exhausted), canceled, or trialing. Each status transition triggers specific webhook events (customer.subscription.created, customer.subscription.updated, customer.subscription.deleted) that your application must handle to keep its internal access control synchronized. The subscription_data.metadata field should carry your internal plan identifiers to simplify webhook processing.

Advanced subscription features include multi-price subscriptions (bundling multiple line items), metered billing (reporting usage via the Usage Record API), billing anchors (normalizing billing dates), and subscription schedules (pre-programming future plan changes). Collection methods can be charge_automatically (default) or send_invoice for enterprise customers who pay via wire transfer with net-30 terms.

Prompt Snippet

Model your pricing as Stripe Products with multiple Prices (monthly/annual) created via the API or Dashboard, storing the price_id in your plans config rather than hardcoding amounts. Create subscriptions with stripe.subscriptions.create() setting payment_behavior to 'default_incomplete' to handle SCA authentication via the returned pending SetupIntent. Sync subscription state by processing customer.subscription.updated webhooks, keying off subscription.status and current_period_end to gate feature access. Use billing_cycle_anchor and proration_behavior: 'create_prorations' for mid-cycle plan changes.

Tags

stripesubscriptionsrecurringbillingsaaspricing