#pavlina_api

1 messages ยท Page 1 of 1 (latest)

blazing hatchBOT
#

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

lilac mirage
#

subscription - sub_1SpogkAZplvGSnJj3P53axro
failed invoice - in_1SpohtAZplvGSnJjSE1mtatM

normal yew
#

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

Apply subscription updates conditionally based on payment success using pending updates for card and Link payment methods with charge automatically.

lilac mirage
#

I see. Except opting out, what more can be done? Can this payment be retried - why isn't it retried from the smart policies?

normal yew
#

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

lilac mirage
#

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?

blazing hatchBOT
normal yew
#

The subscription will continue to cycle yes, we'd generate a new invoice and attempt payment of that. The dunning rules would apply

lilac mirage
#

Okay, thank you so much for bringing clarity into this

surreal adder
#

hi! I'm taking over this thread. let me know if you have more questions.

lilac mirage
#

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?

surreal adder
#

can you clarify what you mean by "the same"?

lilac mirage
#

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

surreal adder
#

correct

lilac mirage
#

but with that I can't pass tax_rates

#

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?

surreal adder
#

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.

lilac mirage
#

that doesn't really work for me, furthermore as the subscription actually get's upgraded thats even weirder in my opinion, having in mind I cannot actually drop this behaviour

#

nor the failed payment gets retried