#surajpatidar
1 messages · Page 1 of 1 (latest)
Hi, how can I help?
how to cancel subscription end of current susbcription time
what if i have created subscription shedule for next month and after i want to cancel susbcription
You can use the cancel_at_period_end: true: https://stripe.com/docs/api/subscriptions/update#update_subscription-cancel_at_period_end
subscription_m = stripe.Subscription.modify(
user.subscription.id,
cancel_at_period_end=True
)
right ?
Correct
one more question
if i have created subscription shedule for next plan after that i want to cancel request which susbcription cancel
stripe.error.InvalidRequestError: Request req_taT3EJUnV0kSZ9: The subscription is managed by the subscription schedule sub_sched_1NXdv1ECJUF37lWXEYZQZZ9L, and updating any cancelation behavior directly is not allowed. Please update the schedule instead.
Do you mean you need to cancel the Schedule in the next phase?
no i want to cancel whole susbcription
Could you please elaborate more on what do you exactly trying to achieve?
i want to cancel subscription if shedule created or not created
Do you want to cancel it immediately or at the end of the current billing period?
end of the current billing period
This Subscription is managed via a Subscription Schedule, so you will need to update the current phase.
so i need to cancel susbcription from susbcription schedule ?
Yes. You can set end_behaviour of the Schedule to cancel: https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-end_behavior
It will cancel at the end of the last phase. If you want to cancel at the end of this billing cycle, you will need to update the current phase end_date and delete the following phases.
https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-end_date
it possible to cancel shedule then cancel susbcription stripe.SubscriptionSchedule.cancel(
"sub_sched_1NYMkmECJUF37lWXYuvnwuGI",
)
using this cancel shedule and after that cancel susbcription end of the current bill
This will cancel the whole Subscription immediately.
You can instead Release the Schedule: https://stripe.com/docs/api/subscription_schedules/release
okay means release the schedule not effecr with current susbcripion right ?
Yes, it means the current phase will become the configuration of the new Subscription. Then you can manage it as a normal Subscription.