#piyush_subscription-update-invoice-preview
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/1425926850755952701
๐ 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.
- piyush_docs, 7 hours ago, 18 messages
Hello ๐
How is the Customer making the change to their Subscription? Is it through your app or some other surface?
through the app(uses flutter)
And you want the user to provide a new payment method instead of charging the default?
Can you describe the desired flow?
I want let user to pay that prorated invoice rather than charging him in background
Can you share an example API request ID that generates the charge to the customer? It will start with req_
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
do you mean update request for the subscription?
Yes, the update request.
req_JLPMfVMqTEAppK
The trouble is, Stripe will automatically attempt to charge the default_payment_method specified on the Subscription for any new invoice.
When you say "I want let user to pay that prorated invoice rather than charging him in background" what exactly do you mean? Do you mean the Customer provides a new payment method (e.g. enters their credit card)? Or you mean they approve the payment using a button or something?
yes i mean currently customer is not aware what amount(the prorated calculation) he will be charged until stripe charges it in background, so i want ti let user pay that invoice manually(on-session in stripe terms)
Unfortunately, the only work-around I know of would be really involved and it would make your Subscription integration much more complex and likely to break.
Essentially you could pause payment collection and specify that any new Invoice be kept in a draft status.
Then you would finalize the Invoice yourself and have the Customer pay it on-session.
Once it's paid you would need to resume payment collection again.
I think this approach would be difficult to implement and more likely to break. I have an alternative approach though. It still charges the Customer in the background but you notify them of the change.
Instead of trying to do what I mentioned above, I recommend you create a Preview Invoice which will return an Invoice object that does not charge the Customer but shows them the amount they would be charged if you make that change.
You can display this to your Customers in your flutter app and ask them for approval. Only when they approve do you make the Subscription update request.
We have a guide about how to use the Invoice Preview API
Okay great, I think that's the best option here.
It provides your customers with the information they need to make an informed choice but doesn't do anything to cause problems with your subscriptions.
piyush_subscription-update-invoice-preview