#sakin_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1221697366726283365
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
After canceling a subscription, customer shouldn't be able to renew the subscription as canceled is the terminal state: https://docs.stripe.com/billing/subscriptions/overview#subscription-statuses
Can you share the example customer ID (cus_xxx) and its customer portal link which you saw the renewal option?
cus_Pme5CG4zNKvKKp this is in test mode, I cancelled plan from billing portal and saw renew plan option.
Also customer.subscription.deleted event isn't triggering even though I activated it, Now I'm handling cancel plan through customer.subscription.updated cancel_at_period_end
Ah I see! Since the subscription is not canceled yet, customer will still have the option to not to cancel the subscription at the end of this billing cycle.
Only when the subscription is canceled, then there won't be renewal options
is it possible to immediately not show renew option?
I'm afraid that will not be possible since the subscription is not canceled yet
Hi @untold geyser I'm taking over this thread
Can you share with me the ID of the subscription that you have canceled, but billing portal shows renew option?
sub_1Ox5yPEJzBDI5iOLcXNbWvpB
If I trigger one time payment then immediately trigger cancel subscription api will there be any problem from stripe POV.
This subscriptoin is still active, not cancelled.
will it cancel at the end of billing cycle?
No, what make you think it should?
why it's not canceled, stripe should automatically cancel the subscription right? or do I need to do anything. I know I need to handle webhook for my backend not related stripe.
No Stripe won't cancel a subscription unless a user told it to do so.
https://docs.stripe.com/billing/subscriptions/cancel you can learn more about how to cancel a subscription here.
when i press cancel plan in stripe billing portal what happens then?
It would set cancel_at_peroid_end to true https://docs.stripe.com/api/subscriptions/update#update_subscription-cancel_at_period_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The subscription will still stay active until the period ends, and your customer can still renew it through billing portal.
However, if you cancel the subscription immediately (https://docs.stripe.com/api/subscriptions/cancel), the subscription will be moved to cancelled state and can't be renewed.
ok got it, currently when i cancel plan customer.subscription.updated webhook is triggering with cancel_at_period_end:true there I need to call this stripe.Subscription.cancel("sub_49ty4767H20z6a") api to immediately cancel subscription right?
Yes you can do that, you can monitor customer.subscription.updated event to get notified when your customer cancels the subscription through billing portal, so that you can cancel the subscription immediately.