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.
. Unlike cancel_at_period_end, these values are resolved to timestamps immediately and aren’t affected by further changes to items.
.
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:
If your integration currently uses the deprecated cancel_at_period_end parameter to cancel subscriptions, use the new cancel_at parameter with the min_
enum value instead. The cancel_
field on a Subscription isn’t compatible with the new cancel_
helpers.