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 tools
Overview
Versioning
Changelog
    Overview
    Basil
    Acacia
    Previous versions
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Build with LLMsStripe for Visual Studio CodeStripe health alertsFile uploads
Security and privacy
Security
Privacy
Extend Stripe
Stripe Apps
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsChangelogBasil2025-05-28.preview

Adds more flexibility for how you manage subscription end-of-period cancellationsPublic preview

What’s new

We introduced new cancel_at enum values for subscriptions configured with flexible behavior (which have billing_mode set to flexible). This change simplifies canceling a subscription at the end of a billing period with mixed intervals.

The new cancel_at enum values are:

  • min_period_end
  • max_period_end

Use these values to cancel the earliest and latest items.data.current_period_end amongst all subscription items.

These new enum values set the cancelation date based on the current subscription’s items.data.current_period_end. Unlike cancel_at_period_end, these values are resolved to timestamps immediately and aren’t affected by further changes to items.data.current_period_end.

The cancel_at_period_end parameter is now deprecated. The behavior of this parameter is unchanged, but in the context of mixed interval subscriptions, it defaults to canceling at the earliest period end.

Impact

The following API endpoints support these new values:

  • Create a subscription
  • Update a subscription
  • Create an invoice preview

If your integration currently uses the deprecated cancel_at_period_end parameter to cancel subscriptions, use the new cancel_at parameter with the min_period_end enum value instead. The cancel_at_period_end field on a Subscription isn’t compatible with the new cancel_at helpers.

Changes

FieldsChangeFrom → to
Invoice#create_preview.subscription_details.cancel_atSubscription#create.cancel_atSubscription#update.cancel_atChanged
DateTime → DateTime | enum('max_period_end'|'min_period_end')DateTime → DateTime | enum('max_period_end'|'min_period_end')DateTime → DateTime | enum('max_period_end'|'min_period_end')

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-05-28.preview
  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.

Related changes

  • Adds the ability to migrate subscriptions to flexible billing mode
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