Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Versioning
Changelog
    Overview
    Basil
    Acacia
    Previous versions
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
Stripe CLI
Sample projects
Tools
Workbench
Developers Dashboard
Stripe Shell
Stripe for Visual Studio Code
Features
Workflows
Event destinations
Stripe health alertsFile uploads
AI solutions
Agent toolkit
Security and privacy
Security
Privacy
Extend Stripe
Build Stripe apps
Use apps from Stripe
Partners
Partner ecosystem
Partner certification
HomeDeveloper resourcesChangelogBasil2025-06-30.basil

Adds billing mode for more flexible subscriptions behavior

What’s new

We’re introducing a new billing_mode parameter that enables more flexible subscription behavior. You can enable it by setting billing_mode[type]=flexible 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 ImpactNew 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 anchorEliminates implicit billing cycle anchor resets. With flexible billing mode, the billing_cycle_anchor remains unchanged during operations that previously caused it to reset, such as setting a cancel_at date or switching to a non-zero price.
Scheduled cancelationConfigurable proration behavior for cancel_at. You can now disable prorations for a truncated first subscription period (when setting cancel_at on creation) using the proration_behavior parameter.
BackdatingSplits 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_start_date 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 trial_end if you modify the cancel_at date to occur before the trial ends.

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 ItemsConsistently 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_immediately=false (for example Avalara)
  • The legacy max_occurences parameter
  • Subscription specific retry_settings Preview

Impact

By default, this update has no impact on existing or new subscriptions. You can opt in by setting billing_mode[type]=flexible 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_mode[type]=flexible 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.

Changes

Endpoint ChangeResource
migrateAdded
Subscription
ParameterChangeResources or endpoints
billing_modeAdded
Checkout.Session#create.subscription_dataInvoice#create_preview.schedule_detailsInvoice#create_preview.subscription_details
 + 6 more
Quote#create.subscription_dataQuote.subscription_dataSubscriptionSubscription#createSubscriptionScheduleSubscriptionSchedule#create

Upgrade

  1. View your current API version in Workbench.
  2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
    • If you don’t use an SDK, update your API requests to include Stripe-Version: 2025-06-30.basil
  3. Upgrade the API version used for webhook endpoints.
  4. Test your integration against the new version.
  5. If you use Connect, test your Connect integration.
  6. In Workbench, perform the upgrade. You can roll back the version for 72 hours.

Learn more about Stripe API upgrades.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc