#dopeboyz
1 messages · Page 1 of 1 (latest)
Hi there, cancel is a terminal state and you can't resume a subscription if it's already cancelled. You need to create a new one
But i am not deleting or cancelling it completely i am just updating the subscription and setting canceled_at_periodend to true
how could i resume the subscription with last schedule subscription after cancelled -> this is your original ask and you said after cancelled
Anyway, you can change the canceled_at_period_end flag to false if you don't want it get cancelled at the end of the period.
Yeah but i am resuming the subscription within period end
👋 Taking over this thread, catching up now
Sorry, I don't quite understand your question. Has your subscription been cancelled? If the subscription is cancelled, it will not be possible to resume subscription. Or do you mean that you schedule the subscription to cancel in the future date, but you decide not to cancel it anymore?
Let me explain it
A user buy a subscription and its an monthly plan. If user decide to cancel the subscription so in our sever we are just changing the subscription cancelledAt_period_end to true.
Becoz a user can resume it's subscription within current period
Yup! So what is the problem here?
My scheduled Subscription gets losed
Can you share the subscription ID (sub_xxx), so that I can take a look?
All i want is when i resume the user subscription i want start last schedule subscription also
My scheduled Subscription gets losed
What do you mean by getting lose? When the subscription schedule is created, you should store the Subscription Schedule ID to perform any update later. Could you share the subscription ID (sub_xxx) that the issue you described, so that I can take a look?
Sure
When user cancel it's subscription i am releasing the subscription
sub_1MjvYQA6RSS0ndD1rvMakb2K
Let's step back a bit. What's your subscription schedule for? If you set cancel_at_period_end on the subscription object itself, why do you need a subscription schedule?
In our app we have a portal when a user can invite mulitple user to use their services and we are using schedule update to update the subscription amount from next billing cycle
I see! Since subscription cancellation at period end and subscription schedule are two different processes, why do you release subscription when the customer's subscription is cancelled at the end of the period? You should just keep the subscription schedule without releasing it
When i update the subscription without releasing the schedule it's throws error that you can't cancel a subscription with active schedule subscription
Ah yes! Cancelling subscription with cancel_at_period_end also shouldn't have any active subscription schedule
One way I can think of is:
- Before cancelling subscription with
cancel_at_period_endand release subscription schedule, your database should keep track the phases that will be changed in the future - Release the subscription schedule and cancel the subscription with
cancel_at_period_end - Only when the customer decides not to cancel the subscription (resume the subscription before cancellation), then you create new subscription schedule with the information saved in Step 1
This one: "using schedule update to update the subscription amount from next billing cycle"
Yup
Alright thanks