#gab-gab_best-practices
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/1220376657328738334
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
I'm not sure either, we focus more on the API here and I'm not exaclty sure how the dashboard calculates the amounts that it shows.
If you're looking for a prebuilt component that displays that information, our Payouts Connect Component may be what you're looking for:
https://docs.stripe.com/connect/supported-embedded-components#payouts
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
Not part of available, there is a separate pending hash:
https://docs.stripe.com/api/balance/balance_object#balance_object-pending
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
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.
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?
I'm using indirect charge using transfer_data.destination
The complete system is already in production, but I'm developping an additionnal dashboard that will be close to the one you sent : https://docs.stripe.com/connect/supported-embedded-components ( except there will be only the amounts I described upper that will be printed)
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"
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)
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 ?
There isn't a field that indicates that, our minimum payout amounts per country are documented here:
https://docs.stripe.com/payouts#:~:text=20 SEK-,Switzerland,-5 CHF
OK i get it, also I'm not sure to understand what is the connect_reserved field that is in the balance
I'd recommend taking a look through this section and see if that clears things up:
https://docs.stripe.com/connect/account-balances#understanding-connected-reserve-balances
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
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.
Any time!