#Azeralt-Subscription
1 messages · Page 1 of 1 (latest)
Hello, to clarify when your customer upgrade a Subscription within a same interval, the next Invoice should be calculated but he won't be charged right away. What was the "payment failed" in this case?
upgrading a subscription within the same interval will make an invoice now with prorata and the next with the new subscription price.
Example :
01/01 : buy basic at 10 €
01/02 : auto renewal : 10 €
15/02 : buy premium : cost 20 € but with prorata : 20 - (10 / 2) - (20 / 2) = 5€ (for the next 15 days). (stripe calculates this)
01/03 : auto renewal : 20€
If the payment succes, it will be charged. The original probleme is that stripe change subscription before payment is confirmed. Maybe it's my code fault, but I think I need to notify stripe what will be the update before the payment, to confirm payment request
yes the subscription changes as soon as you make the API call, it's not connected to if the payment succeeds or not
we have a feature https://stripe.com/docs/billing/subscriptions/pending-updates that lets you apply the change and roll it back if the payment doesn't succeed, which seems like maybe what you want