#atul
1 messages · Page 1 of 1 (latest)
Hi there, you can use subscription schedule to cancel the subscription, or you can cancel the subscription directly.
directly cancelling the subscription gives error
This is error message
message: 'The subscription is managed by the subscription schedule sub_sched_1M1OusHxaKwf0RtdJQZbyU5S, and updating any cancelation behavior directly is not allowed. Please update the schedule instead.',
request_id: req_FuliQRj1F9OvYs?t=1667803106
Ah, sorry I forget you can't cancel if the subscription is managed by schedule.
You can set the end_behavior to cancel (https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-end_behavior) and Stripe will cancel the subscription when the last phase ends.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
My requireement is to cancel all existing schedule and cancel subscription at end of current billing subscription
You can release the subscription schedule first (https://stripe.com/docs/api/subscription_schedules/release#release_subscription_schedule) and so that you can set cancel_at_period_end on the subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.