#piyush_subscription-update-invoice-preview

1 messages ยท Page 1 of 1 (latest)

tender mothBOT
#

๐Ÿ‘‹ 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.

remote roost
#

Hello ๐Ÿ‘‹

How is the Customer making the change to their Subscription? Is it through your app or some other surface?

valid elm
#

through the app(uses flutter)

remote roost
#

And you want the user to provide a new payment method instead of charging the default?

#

Can you describe the desired flow?

valid elm
#

I want let user to pay that prorated invoice rather than charging him in background

remote roost
valid elm
#

do you mean update request for the subscription?

remote roost
#

Yes, the update request.

valid elm
#

req_JLPMfVMqTEAppK

remote roost
#

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?

valid elm
#

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)

remote roost
#

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

valid elm
#

sure, thanks, i'll try it out

#

the second one, ofc

remote roost
#

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.

tender mothBOT
#

piyush_subscription-update-invoice-preview