How subscriptions work | Stripe Documentation

One-liner

Stripe subscriptions enable customers to make recurring payments for access to products or services, complete with a comprehensive API toolkit for managing the lifecycle and billing of these subscriptions.

Synopsis

Getting Started with Subscriptions

Stripe provides a mechanism for businesses to facilitate recurring payments through subscriptions, requiring more customer information retention than one-time purchases. The core API resources essential for managing subscriptions include the Product, which defines what the business offers, and the Price, indicating the cost and charge frequency. Customer objects track multiple charges per customer, and the PaymentMethod details how the customer pays. The Subscription resource links product details to the recurring charge, and Invoices track payment amounts and statuses.

Building a Subscription Integration

Landing Page: Initially, the customer provides an email or other details which are sent to the backend to create a Customer object while moving the user to a Pricing page. Pricing Page: This page displays subscription options derived from pre-created products and prices, allowing the customer to select the preferred option. Payment: A hosted form (Stripe Checkout) collects card details and performs the subscription creation, invoice generation, and payment collection, ensuring PCI compliance.

Subscription Payment Process

In the case of failed payments or the need for authentication (e.g., 3D Secure), Stripe uses PaymentIntents to track the lifecycle of the payment and Subscription objects to reflect the current status. If the payment is incomplete or action is required, notifications for authentication or payment method updates are needed.

Recurring Charges and Dunning

Stripe automates the invoicing and payment attempts for each billing cycle. Dunning (attempts to recover overdue payments) can involve sending reminder emails or using the Smart Retries feature to optimize retry timing.

Off-Session Payments and SetupIntents

For non-payment invoices such as free trials, off-session payments can be managed using SetupIntents, allowing future charges without requiring customer re-authentication.

The Subscription Lifecycle

The subscription workflow entails creating the subscription, generating and paying the first invoice, and subsequently ensuring the subscription remains either active, past_due, or moves to other states like unpaid or canceled based on outcomes of payment attempts or business rules.

Event Handling with Webhooks

Stripe recommends the use of webhooks to handle subscription events effectively, like successful or failed payments, changes to subscriptions, or cancellations.

Subscription and Invoice Management

Businesses can control settings for Smart Retries, emails, manual payments, and handling of 3D Secure payments. Altering subscriptions without cancelation is feasible, supporting use cases like upgrades or pauses.

Key Quotes

  1. "With Subscriptions, customers make recurring payments for access to a product."
  2. "Stripe handles recurring charges for you automatically."
  3. "If payment succeeds, the status updates to paid. If payment fails, the invoice remains open and the subscription becomes past_due."
  4. "Smart Retries use Stripe’s machine learning to pick the optimal time to retry."
  5. "Stripe supports changing existing subscriptions without having to cancel and recreate them."

Make it stick

  1. Subscriptions Simplified: Remember, Stripe takes care of the heavy lifting: From Product to Price to Payment.
  2. Dunning Deliberation: Deep dive into dunning? Think Smart Retries for revenue recovery.
  3. Lifecycle Lingo: Subscription states speak volumes—from active to past due, know the flow to manage cash flow.

Talking points

  1. Did you know that using Stripe's Smart Retries can improve your chances of recovering failed subscription payments using machine learning?
  2. I was surprised at how subscriptions can be altered—like upgrades or downgrades—without canceling them, offering flexibility in billing management.
  3. What are your thoughts on off-session payments with SetupIntents, allowing businesses to authenticate cards for recurring charges without user interaction every time?
This summary contains AI-generated information and may have important inaccuracies or omissions.