#suba_async-capture
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/1290299605891940423
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ are your intents using asynchronous capture?
https://docs.stripe.com/payments/payment-intents/asynchronous-capture
If so, it's expected for the balance_transaction fields to be null until the capture occurs. At which point a charge.updated Event is emitted and the balance_transaction field on the Charge object is populated with the ID of the associated Balance Transaction.
Got it.
My current goal is to get the amount stripe took from transaction(stripe fee) and add our fee.
After having that, I need to transfer the full amount of transaction to a connected account minus what we calculated above.
Is it possible to do this inside the payment_intent.succeeded?
I can't seem to find a way to get the stripe fee here
No, you'll need to wait for the corresponding charge.updated Event, unless you switch off of asynchronous capture.
I'm not using asynchronous capture.
This is our current paymentintent creation:
const paymentIntent = await stripe.paymentIntents.create(
{
amount: amount,
currency: "eur",
automatic_payment_methods: { enabled: true },
metadata: {
...
},
}
);
Async capture is the default behavior depending on the API version you're using. It became the default in 2024-04-10
https://docs.stripe.com/upgrades#2024-04-10
Got it.
Setting it to "automatic" is now showing the object.
Are there any cons to using "automatic" instead of the default?
It's discussed in the doc that I linked to initially. Async improves API latency because you don't have to wait for the capture to get a response to your request.
suba_async-capture
Got it, thanks.
I have another question that is kinda related to this one but about a further step.
Should I ask it here or create a new thread?
Here works
Perfect.
So, our stripe account is registred in the US. But we want to transfer founds to connected accounts that are in other countries.
After doing all of the above, I'm now trying to transfer the founds to the connected account and getting this error: " Funds can't be sent to accounts located in PT when the account is under the full service agreement"
I assume Stripe doesn't allow transfer to connected accounts that are not the same country as the Platform.
What's the ideal way to deal with this?