#Pavan-subscription-flow
1 messages · Page 1 of 1 (latest)
Do you have an example of a subscription update request (req_123) where this happened?
It didnt happened yet, we are implementing the flow.
We got this doubt
and it is valid scenario
right ?
And just to clarify what is happening: you update the subscription, the charge on the new amount fails, and you want to know how to tell that if failed from what returns with the subscription.modify call?
Yes
If you expand latest_invoice on the modify call you can check its status to see how the payment went
I think so. I am trying to check now.
And also if payment fails, subscription quantities won't be updated right ?
It might be best to listen to the invoice.payment_failed event in general to notify users of this kind of failed payment
That flow we understand, it is asynhronous
I believe the quantities will be updated
How long we can wait ?
Why does it need to be synchronous here?
Since payment will be deducted from user, if it fails
User should get to know immediatley
and also subscription shouldn't have new quantities
since it is failing
and what happens in the next billing cycle as wel
Will they charged with new quantities or old quantities
I am reproducing this behavior now. I will let you know what I find
@sharp fox while Pompey looks at it, what you need to do is also set this up in Test mode yourself and go through testing this and understanding how it works
But how can i know what amount they will deducted at the end of billing cycle
Those scenarios can't be tested
they totally can https://stripe.com/docs/billing/subscriptions/prorations covers how proration/changes work in details
https://stripe.com/docs/billing/subscriptions/pending-updates is what you want so that the update is conditional on them paying the prorated amount for example
it's all documented in our docs in details and you, as the developer, can test most of this in a few minutes
@toxic mango Suppose customer updates subscription with new quantities but payment failed, what happens in the next billing cycle. Will they charge for new quantities or old quantities. Is it possible to update time to new billing cycle ?
this is all explained in the 2 docs I shared above, Can you make sure to take a few minutes to read those end to end and map that to your own business model?
If payment fails, rolling back the updates is a manual process. You need to create a new invoice, prorate items on the invoice, and then initiate payment again.
@sharp fox you are not reading the docs though you're just assuming here
Sorry, reading further
I explicitly linked you to the doc I knew you wanted: https://stripe.com/docs/billing/subscriptions/pending-updates
that doc covers exactly what you want: defer pricing changes until after they paid!
Let me read completely and come back
sounds good!
If subscription has pending_update and if it is not void. Then what it will do
It will keep on trying the payment
no we don't retry
you have to drive this and get them to pay this otherwise it will revert
I mean if payment method gets updated then pending update will become actual update.
not sure what that sentence means
I am understanding the complications of not void the pending_update
Difference between void pending_update and not void pending_update
What is the context? The word void is not used once on that doc
ugh sorry, the last section was collapsed
okay so all that sentence means is that if you want to cancel in real time you void
if you don't we will void automatically after 24 hours (it's like the incomplete flow)
Cool. Thanks