#dominikganic_unexpected
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/1349298221901414401
๐ 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.
- dominikganic_best-practices, 13 hours ago, 29 messages
- dominikganic_unexpected, 1 day ago, 13 messages
Invoice: in_1R1kRDLZihhBkt1caUXlAMWr
Customer (with Testclock): cus_RuzJQRqNSLIu8n
Subscription: sub_1R1OVVLZihhBkt1czf93LP2N
Latest payment request try: req_spsFb1dDtpN8yB
FYI: I have noticed, this invoice gets in this "weird state" whenever I try multiple times a failed payment intent. I have tried different cases to simulate my UI with errors, and suddenyl the invoice became "unusable".
Thank you very much ๐
As you can see, the recent invoice on top (the newest) is still "open". But can't be paid.
I'm just curious what should I do now? Should I "void" that invoice and create a new invoice bound to this subscription and let the user pay it?
sorry for taking so long, I'm still investigating this
No problem. I just hope I'll find a smooth way to handle this the best way ๐
I'm trying to confirm that this is related to the number of retries
Sure. ๐ The payment intent of this invoice is "canceled" due to the retries I've attempted.
but once the invoice is at this state you can no longer pay it
Okay that would be no problem. I could void this invoice and create a new one then yeah? Or is that a "bad behavior".
I wonder why I could pay the invoice within the dashboard?
Ah no it can't! It shows me an error when trying to pay. Okay.
It looks like I have to setup a different payment method to this invoice and try paying it with another payment method?
no that's perfectly fine
Okay ๐ So the best way would probably be to listen to a webhook endpoint and create a new invoice from there.
once the payment intent is canceled you can no longer pay the invoice
I see, tried it, didn't work.
I will try to listen quickly to a webhook endpoint and void & create a new invoice! Give me 1 min ๐
Hm I didn't receive any relevant webhook endpoint nor can't I find any.
Only "invoice.payment_failed" was triggered multiple times when coming to 3DSecure
So I don't know when I should void it and create a new one :/
Hi there ๐ jumping in as my teammate needs to step away. Do you see a payment_intent.canceled Event being generated? That's the best Event type I'm thinking of offhand to listen to, so you know when the Payment Intent underlying the Invoice is canceled.
I've bound them now. Let's check ๐ 1 sek. Thanks for reacing out!
Yeah, I received the intent canceled in my webhook now exactly when the retry-count was reached
I will try to handle this in my frontend now to show the user, that this invoice can't be paid anymore and that a new one has been generated now.
And in my webhook endpoint I will catch the "canceled" event, void the current invoice and create a new one. ๐
Let's hope that this works out.