#zaq_payouts-balance-transactions

1 messages ยท Page 1 of 1 (latest)

broken waveBOT
timber locustBOT
#

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.

broken waveBOT
#

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

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

frozen jetty
#

now we just want to trigger a payout for the remaining balance of that charge
So are you saying you transfer some portion of the funds to a Connected Account?

Can you share the ID of an example charge? When you say payout are you referring to funds coming from your Stripe account into your external bank account?

timid hull
#

sure!

so we have this latest_charge of: ch_3PCBfsE1o3vQgPLo15JL6dAc
on our paymentIntent of pi_3PCBfsE1o3vQgPLo1uk0gFXv

and then we successfully did a transfer of tr_3PCBfsE1o3vQgPLo1XYWCzXU

and yes, we're trying to automate a payout from our stripe account to our external bank account for the remainder of each charge we receive from our customers after the transfers to our third party business partners

frozen jetty
#

That would depend on whether or not it is available in your Stripe balance

timid hull
#

yeah, but what is the best means of automating this? if we have a successful paymentintent, is there a delay before those funds are in our stripe balance?

frozen jetty
#

There is, just let me collect some details so I can explain it directly with this charge

#

Okay so this is a little more tricky because of the Separate Charge & Transfer flow.

timid hull
#

yaaaa, i needed to put metadata on the transfers, so i had to split them apart from the charge

frozen jetty
#

Gotcha. Okay I'm looking at the two Balance Transactions associated with the Charge and the Transfer

timid hull
#

the available_on isnt part of the paymentIntent object though is it?

frozen jetty
#

No, it's specific to the BalanceTransaction because that's the lowest level object that records any transaction that impacts your Stripe balance

timid hull
#

does the balanceTransaction have a chargeId associated with it so i can link it to a user's payment?

#

or a source_transaction or something

frozen jetty
timid hull
#

okay. so, i just want to make sure i follow.

when we have a paymentIntent with a status of 'succeeded' message that hits our server through a webhook we setup. we can request a balanceTransaction from stripe via something like
const balanceTransaction = await stripe.balanceTransactions.retrieve(transactionId);
and then from the available_on data we can find out WHEN we can then initiate a payout?

#

but there's no way to recieve a message via webhook automatically when the funds are available in our account related to any specific charge?

frozen jetty
#

I haven't tested that to see how noisy it is but that could be another approach and would mean you don't have to do all the calculations yourself

timid hull
#

just to clarify,

the balance.available message just tells us when a certain amount of money is available in our account, but not the original charge it comes from correct?

frozen jetty
#

Correct

#

So if you wanted to link it back to the specific payment, you still would need to take the Balance Transaction approach

timid hull
#

okay cool. let me talk to my team about what method makes the most sense for us. thank you for the clarification though!!!

frozen jetty
#

Happy to do it! ๐Ÿ™‚ I hope one of those options works out for you ๐Ÿ™

timber locustBOT