Stripe adds retention policy cancellation reason to Subscription API
Overview
The Stripe Subscription API now includes a new cancellation reason enum value: canceled_by_retention_policy. This addition clarifies why certain test subscriptions are automatically canceled, reducing confusion during development and testing.
What Changed
The cancellation_details.reason property on Subscription objects now returns canceled_by_retention_policy when a subscription has been automatically canceled due to Stripe's test data retention policy. This value can only appear on test mode subscriptions where livemode is false.
Breaking Change Details:
- Subscriptions previously showing
cancellation_details.reasonascancellation_requestedwill now displaycanceled_by_retention_policyif canceled by the retention policy - This is a breaking change affecting integrations that explicitly handle all possible
cancellation_details.reasonvalues
Required Actions
If your integration handles subscription cancellations, you must:
- Update code expecting
cancellation_requestedfor retention policy cancellations to handle the newcanceled_by_retention_policyvalue - Ensure all possible values of
cancellation_details.reasonare properly handled - Test against the new Dahlia API version before upgrading to production
Upgrade Path
- Check your current API version in Workbench
- Upgrade your SDK to the corresponding version for Dahlia, or update API requests to include
Stripe-Version: 2026-03-25.dahlia - Update webhook endpoints to use the new API version
- Test your integration thoroughly in both test and production modes
- Perform the upgrade in Workbench (you can roll back for 72 hours if needed)