#verox_api
1 messages ยท Page 1 of 1 (latest)
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.
- verox_api, 1 hour ago, 6 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247212157196566648
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Alright, thanks a lot.
HI ๐
I'm stepping in as my collague needs to go.
We both reviewed how this error is thrown and it looks like the Invoice needs to be in a draft state to have Coupons applied.
Is it the case that you are not applying the coupon at the time the user is initially attempting to pay the invoice?
It's either "open" or "uncollectible". So no, it's not a draft.
Okay but what I am saying is you cannot apply the coupon when the Invoice is uncollectible. So you will need to change the statues before you can update it.
With a coupon specifically
How can I change the status? Can I just update the status back to "open" or "draft"?
You cannot directly update the Invoice status.
And how would I do it then?
Question: What is the flow of your integration such that the invoice goes to uncollectible when the Customer's first payment method fails?
The payment fails, and the invoice automatically switched to "uncollectible". I certainly didn't choose that.
That's not the default behavior for subscriptions
As we document here: https://docs.stripe.com/invoicing/integration/workflow-transitions, a failed payment should just result in an open Invoice
And, in fact, that is the status of the Invoice when the payment_failed event is fired: https://dashboard.stripe.com/events/evt_1PMGDq2GOJZ85wYsljyEcUd6
It's not a subscription. It's just a regular invoice
I'm reviewing all the requests made related to this Invoice and getting even more confused. There are multiple calls to Pay the invoice, specifying a payment method, and then attempts to update it with coupon codes
Yes, because all payments failed and the coupon codes is being applied afterwards.
Is there anything weird happening?
Even when the invoice status is "open", I get this error: "Finalized invoices can't be updated in this way"
Hi there ๐ taking over, as my colleague needs to step away
As far as I know, you can't add coupons after an Invoice has been paid, so that seems to be expected behavior
But the invoice hasn't been paid yet.
It has the status "open"
Ah, okay. I think I got confused about this line specifically
I'm checking in with a colleague now and will circle back
Thank you very much!
Okay, so when your payments fail, bank debits are not retried since there's a fee on each failure. So these payment method types behave a little differently than cards
Ah, okay. So I would have to create a new invoice everytime?
To retry the same payment method yes
But I still can't apply discounts, when the invoice status is "open". How do I solve that?
can you pass them when you pay the invoice?
No, I get this error: "Finalized invoices can't be updated in this way"
Can you add the coupon before you get to that point? Like update the Invoice then pay? Or pass the coupon when the invoice is created?
I can add it, when the status of the invoice is "draft".
I think I got it. I just won't finalize the invoice, until all coupons have been entered. And for the case that the payment failed, I create a new invoice, based of the old one.
Thanks for your help!