#gab-gab_best-practices

1 messages ยท Page 1 of 1 (latest)

kind dawnBOT
#

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

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

hearty merlinBOT
regal crescent
#

Hi there ๐Ÿ‘‹ it sounds like you're working on retrieving, and interpreting, the Balances of your Connected Accounts:
https://docs.stripe.com/api/balance

What about that can I help provide guidance or clarity on?

unreal crown
#

As I understood to display the total amount I would pick available.amount
I'm not sure what should be picked to display the estimated future payout amount
Same question for the amount that would be in transit to the bank

regal crescent
#

I think the estimated future payout may align with the pending balance.

#

The "on the way to the bank", I'd assume are harder to calculate. I think you may need to step through all Balance Transactions that have a type of payout and a status of pending so you can sum all of those.
https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-status

unreal crown
#

Ok I get it for the "on the way to the bank", it makes sense.
About the "estimated future payout" I'm not sure. I understood it would be kind of a subpart of the available amount.

regal crescent
#

I'm not exactly sure that's what the dashboard shows, but offhand I think it's the closest option if it doesn't direclty align.

unreal crown
#

Ok I will try to explain what I want independently from what I see from the dahboard.

I understood the balance pending_amount is funds that are not yet in the connected account.
What I want is to display an estimation of the payout that will be done according to the scheduled policy. It might take in account the "reserved" amount from Stripe, and also the potential "reserved" amount the platform have set.

regal crescent
#

What charge structure are you using for your Connect integration? I think that's going to be important if you're trying to pull in in-flight transactions to what you're showing. How close are you currently to having what you desire, or what do you have working so far?

unreal crown
#

I'm using indirect charge using transfer_data.destination

#

From this "embed component":
Available and soon available to the connected account balance is clear. It is the amount available and the amount pending respectively.
Also I got it for the "amount in transit for the connected bank account"

regal crescent
#

That's going to be tricky to build for a Destination Charges flow. Those settle to your Platform account, and then trigger instant Transfers to move the funds to the Connected Accounts. So the pending transactions are all going to be consolidated on your Platform account.

#

Sounds like you'll need to step through all of your pending Balance Transactions, I believe you'll be looking for types of payment and charge but would recommend double checking exactly what type of Balance Transactions you see being created in testmode for your flow.

#

As you're going through those, you'll need to find the object you created that is processing those payments (like a Payment Intent) and determine which Connected Account will be receiving the funds so you know which account to attribute them to (minus your application fee)

unreal crown
#

For now I can put on hold the "movements in transit" that seems to be a bit tricky to implements. Alternatively I could just display a monthy report

However I cannot understand, querying the balance API, why I have a connected account with a amount.available that is CHF 2.48.- and where the monthly payout hasn't been done. Which entities or fields should I query to be able to understand why the amount is to low to be payout ?

regal crescent
unreal crown
#

OK i get it, also I'm not sure to understand what is the connect_reserved field that is in the balance

regal crescent
unreal crown
#

Ok wan't sure it seems to be the platform one.

#

So I could insume that if the available amount is greater than the minimum payout allowed by country ( and if the the platform reserved amount is 0)
the next scheduled payout will be the full amount of the available balance

regal crescent
#

I think that depends on how long it is before the next Payout is triggered. If there's enough time for more payments to settle, or for already settled payments to be refunded, then the Payout amount may not align with what you're seeing right then in the available balance.

unreal crown
#

Ok got it, I will label it as an "estimated next payout"

#

Thanks for your time

regal crescent
#

Any time!