Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Canceling Stripe subscription throws scheduling error

I recently increased the prices of my Stripe subscription plans on my Laravel SASS application. Now, when a user cancels their subscription, it throws the following error:

"The subscription is managed by the subscription schedule sub_sched_XXXXXXXXXX, and updating any cancelation behavior directly is not allowed. Please update the schedule instead."

I'm using Laravel 5.6 and have this in my composer.json file: "laravel/cashier": "~7.0",

Basically, I get the subscription object and just call cancel(). E.g.:

$subscription->cancel();

This worked for years until I recently changed my prices. Is this a programming error on my part, or do I need to move my subscription plans off of schedules somehow? I'm really stumped here, because Googling has not turned up any useful results on this error.

like image 408
M. Kressel Avatar asked Aug 02 '26 12:08

M. Kressel


1 Answers

Found the issue. The recent price change moved the subscriptions onto a schedule. I had to release the subscription schedule using the API here:

https://stripe.com/docs/api/subscription_schedules/release?lang=php

like image 110
M. Kressel Avatar answered Aug 05 '26 11:08

M. Kressel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!