#suba_async-capture

1 messages ยท Page 1 of 1 (latest)

pliant sparrowBOT
#

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

north canopyBOT
unreal spade
#

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.

Use Asynchronous Capture to enable faster PaymentIntent confirmations.

cedar isle
#

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

unreal spade
#

No, you'll need to wait for the corresponding charge.updated Event, unless you switch off of asynchronous capture.

cedar isle
#

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: {
...
},
}

  );
unreal spade
cedar isle
#

Got it.
Setting it to "automatic" is now showing the object.
Are there any cons to using "automatic" instead of the default?

unreal spade
#

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.

pliant sparrowBOT
#

suba_async-capture

cedar isle
#

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?

unreal spade
#

Here works

cedar isle
#

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?