Adds billing mode for more flexible subscriptions behavior
What’s new
We’re introducing a new billing_
parameter that enables more flexible subscription behavior. You can enable it by setting billing_
when you create subscriptions, invoice previews, Checkout Sessions, quotes, or subscription schedules. The default, classic
mode, preserves existing behavior. You can also migrate existing subscriptions using the new billing mode migration endpoint.
We’ll refer to the existing billing behavior as classic
going forward.
See the summary of the new behaviors with flexible billing mode below. Learn more about the differences between classic and flexible billing modes.
Area of Impact | New Behaviors |
---|---|
Proration | Accurate credit proration calculation. Flexible billing mode consistently uses the original debited amount, accurately accounting for historical taxes, discounts, and billing cycles. Proportional discount application for prorations. We apply discounts proportionally to each subscription item during proration calculations instead of distributing them evenly. This results in more prorations, especially when invoicing on a per-item basis or canceling items with unevenly distributed discounts. |
Metered pricing | Suppresses zero-amount line items when adding metered items. Flexible billing mode doesn’t create zero-amount line items when you add metered items to a subscription. If the invoice is empty as a result, we don’t generate one. Bills metered usage based on the price at the time of reporting. Flexible billing mode bills for usage based on the price at the time you report it. If a metered item’s price changes during a period, only usage reported after the price change is billed at the new price. Bills for unbilled usage when removing metered items. Flexible billing mode generates an invoice item for unbilled usage when you remove a metered subscription item. This applies to removals using the API or during schedule phase transitions. Consolidates invoices for phase transitions with metered items. Flexible billing mode consistently generates a single invoice when a subscription cycles, eliminating separate invoices for removed metered items. |
Billing cycle anchor | Eliminates implicit billing cycle anchor resets. With flexible billing mode, the billing_ remains unchanged during operations that previously caused it to reset, such as setting a cancel_ date or switching to a non-zero price. |
Scheduled cancelation | Configurable proration behavior for cancel_ . You can now disable prorations for a truncated first subscription period (when setting cancel_ on creation) using the proration_ parameter. |
Backdating | Splits backdated time range into multiple invoice items. Flexible billing mode creates separate invoice line items for each billing period within the backdated range. It automatically aligns the billing cycle anchor to the backdate_ if you don’t set it explicitly. |
Trials | Updates the trial start date for subsequent trials. When you add a second trial to a trialing subscription, flexible billing mode uses the most recent trial’s start date. Preserves the original trial end date when the cancellation date changes. Flexible billing mode preserves the Standardizes the trial period line item description. With flexible billing mode, both metered and licensed items use a consistent description format—“Free trial for {quantity} x {product name}”—for a more uniform presentation of trial information. Generates line items for changes made during a trial. In flexible billing mode, items that haven’t changed aren’t re-billed. This ensures that customers are only billed for the adjustments they make during their trial. |
Pending Invoice Items | Consistently includes pending invoice items. All available pending invoice items are now included when generating invoices for updates. Previously, this depended on the specific reason for the invoice update. |
Flexible billing mode isn’t compatible with all Stripe Billing features. The following features are currently incompatible and return a 400
error code when you create and update a subscription with flexible mode enabled:
- Prebilling Preview
- Billing thresholds
- Legacy Usage-based billing
- Legacy 3P tax integrations using
pay_
(for example Avalara)immediately=false - The legacy
max_
parameteroccurences - Subscription specific
retry_
Previewsettings
Impact
By default, this update has no impact on existing or new subscriptions. You can opt in by setting billing_
on the following API methods:
- Create a subscription
- Create an invoice preview
- Create a checkout session
- Create a subscription schedule
- Create a quote
You can migrate existing subscriptions from classic to flexible by passing billing_
in the billing mode migration endpoint. Switching to flexible billing mode is a one-way update: you can’t revert a subscription to classic mode after migration.