Subscription Billing Workflow
A subscription billing workflow manages the full lifecycle of a recurring charge: from the initial sign-up through renewals, payment failures, dunning, and eventual cancellation or recovery.
A subscription billing workflow manages the full lifecycle of a recurring charge: from the initial sign-up through renewals, payment failures, dunning, and eventual cancellation or recovery.
The workflow begins when a customer signs up and provides a payment method. The billing system creates a subscription record with a billing interval (monthly, annual), the next billing date, and the payment method token. If the plan includes a free trial, the subscription is activated immediately but the billing date is pushed forward by the trial length — no charge is attempted until the trial ends.
On each billing date, the system generates an invoice for the subscription period and attempts to charge the stored payment method. If the charge succeeds, the subscription renews, the next billing date advances, and a receipt is sent to the customer. If the charge fails — due to an expired card, insufficient funds, or a soft decline — the system does not immediately cancel the subscription. Instead, it enters a dunning process: a scheduled series of retry attempts (often at 3, 7, and 14 days) accompanied by email notifications asking the customer to update their payment method.
If all retry attempts fail within the dunning window, the subscription is suspended or cancelled depending on business rules. If the customer updates their payment method during the dunning window, the pending invoice is retried immediately. Successfully recovering a failed subscription avoids churn, so well-designed dunning flows significantly impact revenue retention.
Cancellation can also be customer-initiated at any time. Depending on the policy, access may continue until the end of the current paid period (access-until-end-of-period) or be revoked immediately. The Payment Retry Logic diagram focuses specifically on the retry and backoff mechanics. See Invoice Generation Flow for how invoices are structured and delivered.