#pavlina_api
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/1461325171725176979
๐ 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.
- pavlina_api, 20 hours ago, 25 messages
subscription - sub_1SpogkAZplvGSnJj3P53axro
failed invoice - in_1SpohtAZplvGSnJjSE1mtatM
That is standard behaviour โ the upgrade to the sub happens regardless of whether or not the payment succeeds. You can opt out of that via payment_behavior: 'pending_if_incomplete': https://docs.stripe.com/billing/subscriptions/pending-updates
I see. Except opting out, what more can be done? Can this payment be retried - why isn't it retried from the smart policies?
Retries only work for recurring invoices, this is not a recurring invoice that nautrally generated according to the sub's billing cycle
If you want to retry the invoice payment you'll need to bring the customer back on-session and have them complete payment in a checkout flow, or they can use the hosted invoice URL
What will happen if none of the above are executed. That payment during the subscription upgrade won't be retried but will he be charged on his next date of invoice?
The subscription will continue to cycle yes, we'd generate a new invoice and attempt payment of that. The dunning rules would apply
Okay, thank you so much for bringing clarity into this
hi! I'm taking over this thread. let me know if you have more questions.
I'll have to see how to implement this with Cashier which unfortunatelly you guys don't help with
actually - is this the same for new subscriptions?
can you clarify what you mean by "the same"?
I mean the customer is not subscribed if the payment fails
So I'm assuming that I don't need to add payment_behavior: 'pending_if_incomplete' to new subscriptions
correct
but with that I can't pass tax_rates
When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[0][tax_rates] is not supported. See https://stripe.com/docs/billing/subscriptions/pending-updates-reference#supported-attributes for more details.
How I'm supposed to send tax also
So generally if I cannot pass pending_if_incomplete and the customer gets subscribed to the new plan the only way to get the amount from that upgrade is if he willingly goes to complete it? otherwise he may update his payment for the next cycle and he will be charged but that upgrade amount will never be paid - am I correct?
When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[0][tax_rates] is not supported
ha yes, that's true
So generally if I cannot pass pending_if_incomplete and the customer gets subscribed to the new plan the only way to get the amount from that upgrade is if he willingly goes to complete it?
the payment may or may not succeeded yes. if it fails, then it's up to you to get them to complete the payment yes.
this is not ideal, but that's how it works. a payment can always fail for a variety of reasons.
you can update your app logic to only let user access your services if their latest invoice was actually paid.