#nicolas_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/1445329937044213823
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ Hi there! Let me take a look
We've tried to update the subscription using the trial_end value, expecting the subscription end value to be extended, which works
If this works for you, then it seems you should be able to first mark the subscription as active, before extending the trial?
We didn't to do that, to respect the user's choice not to have to pay the subscription again.
Would this activation be visible for the end user in it's Stripe portal?
I see. So I think you'd have to mark the subscription as active again, update the trial duration, and then mark the subscription as cancelling again
Getting back to my question, would this "trick" be visible to the user? Or can it be invisible to him?
It wouldn't be visible, as you'd do those operations at the same time
But I just tested this now, and it seems possible to update a subscription that has been marked as cancelling
The request that you shared seems to refer to a Subscription that has been ended entirely, due to the testmode retention policy: https://support.stripe.com/questions/test-mode-subscription-data-retention
Ok, we see that information in the popin about the 90 days retention
Can you confirm that it's still normal for the API to return september 2026 as the end date ?
Yeah, the current_period_end will reflect the billing cycle. But since the invoice has status: canceled (plus the canceled_at and ended_at timestamps), you know that the subscription has ended and cannot be recovered
You want to handle "the case of an existing customer, with a cancelled subscription that has not yet ended".
That means their subscription will either have status: trialing or status: active (but will have a canceled_at timestamp) โ and in these cases you can update the trial_end
Thanks arran. We've learned a lot and can now move to implementation
Sounds good!
Have a good day