#dominikganic_unexpected

1 messages ยท Page 1 of 1 (latest)

echo juncoBOT
#

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

inland aurora
#

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".

wraith holly
#

๐Ÿ‘‹ happy to help

#

taking a look

inland aurora
#

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?

wraith holly
#

sorry for taking so long, I'm still investigating this

inland aurora
#

No problem. I just hope I'll find a smooth way to handle this the best way ๐Ÿ™‚

wraith holly
#

I'm trying to confirm that this is related to the number of retries

inland aurora
#

Sure. ๐Ÿ™‚ The payment intent of this invoice is "canceled" due to the retries I've attempted.

wraith holly
#

but once the invoice is at this state you can no longer pay it

inland aurora
#

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?

inland aurora
#

Okay ๐Ÿ™‚ So the best way would probably be to listen to a webhook endpoint and create a new invoice from there.

wraith holly
inland aurora
#

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 ๐Ÿ™‚

echo juncoBOT
inland aurora
#

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 :/

atomic valve
#

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.

inland aurora
#

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.