#samip_unexpected
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/1393012791320907806
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- samip_webhooks, 1 day ago, 14 messages
- samip_webhooks, 2 days ago, 8 messages
There can be multiple subscriptions under a customer. You'd need to specify the subscription or any of the parameters that listed in the https://dashboard.stripe.com/test/logs/req_UX0I0DEn6g0mJf to preview the upcoming invoice.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Could you share what you're trying to preview here?
I am trying to migrate the Stripe SDK from a very old version 16.12.0 to the latest.
I found that there were breaking changes and invoices.retrieveUpcoming has been replaced with invoices.createPreview. All I am trying to do is view an upcoming invoice for a customer inorder to extract some data out of it.
This thread : https://discord.com/channels/841573134531821608/1392341967890813041 pretty much sums up what I was trying to do, I was advised to use the createPreview for it.
Thanks for sharing! Preview Invoice API only supports previewing the upcoming invoice for a subscription or subscription schedule, but not on customer itself. I'm afraid you'd need to explicitly pass one of those parameters to preview the invoice.
Thanks, I'll try this out once.
No problem! Happy to help ๐
Sorry, can I please get help on one more thing?
req_wNFLW5imB6qlEE
Previously, you could undo cancellation on a subscription by setting cancel_at_period_end to false.
It seems like now with cancelled subscriptions you cannot do that.
What's the next best alternative ?
What I am trying to achieve is this flow:
A customer signs up for a yearly subscription and decided to cancel at some point of time.
The customer has a change of mind and they want to resubscribe within the cancellation period (i.e before the actual cancellation happens)
We want to undo the cancellation they initiated.
๐ taking over from my colleague, let me catch up
Sure
@river field this requests (req_wNFLW5imB6qlEE) is making an update to a subscription that was already cancelled
Cancelled is a terminal state, so you can't update the subscription after that
I can see that sub_1RjC9UR9vNwGzNRDj5GyNEZu was cancelled on 10/07/2025, 05:35:32 BST when this event generated: evt_1RjCCnR9vNwGzNRDM8NuIzM8
I have sent a sample flow above that I'd like to achieve, is it no longer possible ?
For your convinience, I am just quoting from the above
What I am trying to achieve is this flow:
A customer signs up for a yearly subscription and decided to cancel at some point of time.
The customer has a change of mind and they want to resubscribe within the cancellation period (i.e before the actual cancellation happens)
We want to undo the cancellation they initiated.
*A customer signs up for a yearly subscription and decided to cancel at some point of time.
The customer has a change of mind and they want to resubscribe within the cancellation period (i.e before the actual cancellation happens) *
This is only possible if the customer schedules the cancellation, meaning that they cancel on a future date
The cancellation is due to happen on a future date though ?
In the example provided (sub_1RjC9UR9vNwGzNRDj5GyNEZu), the subscription is already cancelled when req_wNFLW5imB6qlEE is made
Ah, makes sense.
So let's say if your customer's subscription runs from 1 - 31 July.
On 12 July, they decided to cancel their subscription at the end of billing period, meaning the subscription will be cancelled on 31 July.
On 14 July, the customer changed their mind and decides not to cancel the subscription.
In this above scenario, you can use https://docs.stripe.com/api/subscriptions/update#update_subscription-cancel_at_period_end because as of 14 July, the subscription isn't cancelled yet.
Using the same example. if the customer wants the subscription cancelled immediately on 12 July, this is not reversible. The subscription will enter the terminal state (Cancelled) on 12 July