#peter_async-capture-balance-transaction

1 messages ยท Page 1 of 1 (latest)

chilly turretBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

main notch
#

Hello ๐Ÿ‘‹

The default behavior for Payment Intents is asynchronous capture. This means the funds are not captured by the time the response to the /confirm call is returned.

This changed with API version 2024-04-10 which we document here

versed lily
#

Hmm okay

main notch
#

Did anything about your code change? Mabye API version pinning?

#

Do you have an example /confirm request ID I can take a look at?

versed lily
#

Here's one of the confirm requests: req_ohY9GbZN0Zl8Dy

#

And yes, things have changed, not the API version but some fo the logic on how we handle this process, which might be making it happen faster than before. We did not know that part of this was asynchronous.

main notch
#

Oh so your server-side logic is running faster now and that is why you're seeing this issue?

versed lily
#

That's my guess

#

Is there way for us to know for sure if the balance transaction has been created?

#

Well, not so much 'if' but 'when'

#

Aside from polling the server

main notch
#

You can listen for the charge.succeeded webhook event. This event was fired 1 second after the /confirm call returned a response.

#

The Charge object that is returned in this webhook event includes the ID of the Balance Transaction

versed lily
#

Okay - we will look into that. Thank you for the help.