#ares_webhooks
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/1379030232102600735
๐ 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.
- ares_api, 1 hour ago, 15 messages
I have upgraded stripe api to basil version and have noticed the charge.succeeded event sends balance_transaction as null in the event object. But the charge has balance_transaction valid if I log the charge object.
You may check this charge_id = ch_2RVUguqWxM0n7YqD0QAWW657 and the respective event_id = evt_2RVUguqWxM0n7YqD0izu8lgA
Likely because of this change where the BT is created async: https://docs.stripe.com/changelog/2024-04-10/automatic-sync-default-paymenintents
There'll be a charge.updated event sent when it is set: https://docs.stripe.com/payments/payment-intents/asynchronous-capture#listen-webhooks
https://dashboard.stripe.com/test/events/evt_2RVUguqWxM0n7YqD0gc47i3Q
So instead of looking for balance_transaction on charge.succeeded event, we should now look for it on charge.updated event. Is that right?
Yep!
Okay i just tried passing capture_method: 'automatic', in payment intent creation and now the charge.succeded event is having the balance transaction set. What i understand now is:
- If we use the automatic_async in PI creation, we can get a valid balance_transaction, if not it will be null
- Or we can use the charge_updated event to get the balance transaction if we decide to no use automatic_async in PI creation.
Am I right?
The opposite
If you do use automatic_async (default) you need to check charge.updated events for the balance_transaction property
I am seeing balance_transaction on charge.succeeded if I use capture_method: 'automatic',
here is the charge_id created with this behaviour ch_2RVUxXqWxM0n7YqD1gYfUdN5
Yes as expected
It's only if you use automatic_async where it won't be set in .succeeded events
The guide here explains all this
Just to confirm automatic_async is same as this capture_method: 'automatic', ?
No
Please, read the guide I've linked. It explains the differences and how it impacts your integration
ah I get it. Since I was not explicitly using capture_method: 'automatic', during PI creation, balance_transaction was null, now that I use it, it not null any more on charge.succeeded event.
But if if use capture_method: 'automatic_async', I need to check for balance_transaction on charge.updated event rather than charge.succeeded
Yes
The default behaviour on your API version is automatic_async. So if you don't pass that param at all, you need to listen for .updated events where balance_transaction will be set
Obviously you can opt into the old behaviour by passing capture_method: 'automatic' โ choice is yours