#thefyrewire_api
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/1463905209477496937
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, you can use the cancel_at_period_end boolean to check this https://docs.stripe.com/api/subscriptions/object#subscription_object-cancel_at_period_end
Hi, thanks! I did see that property, but I'm confused, I cancelled a subscription and can see when I fetch all my subscriptions, that one has a status of canceled and a time for canceled_at (both expected), but cancel_at_period_end is false
It's sub_1SfghDJ091CwhHnmSYY00bAi
interesting, looking into that now
ok, I was wrong about that field. it's only set to true if it's passed explicitly with the cancel request, which this one was not https://dashboard.stripe.com/acct_1LI9sgJ091CwhHnm/test/logs/req_BzoQ7BYUxPSDUX
basically your example subscription was cancelled immediately instead of being scheduled to cancel at the end of the period https://docs.stripe.com/billing/subscriptions/cancel#cancel-at-the-end-of-the-current-billing-period
but I think this still answers your original question... if the subscription is in the process of canceling at the end of the period, cancel_at_period_end would still confirm that
Oh interesting! So actually when the subscription is cancelled, it needs to be scheduled to cancel and not immediately cancelled. Therefore in my example, the status of a "canceling" subscription should still be active until the actual day it is cancelled (at period end)
Is that correct?
that's correct, yes
Thank you for the help!
you're welcome!