#deepak_payouts-balance-transactions
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/1236012013113704529
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
If you have a payout ID you can retrieve it via the API https://docs.stripe.com/api/payouts/retrieve
You can also list Payouts by their status
https://docs.stripe.com/api/payouts/list
Each Payout object will include the amount
https://docs.stripe.com/api/payouts/object#payout_object-amount
You would need to do that on your end.
oh okay
You can use the List API to get all paid payouts for the past 30 days using the status and arrival_date filters
Same with status pending
Then sum them
available_payouts = stripe.Payouts.list(status='paid')
paid_total = sum([payout.amount for payout in available_payouts])
Awesome!
Happy to help ๐
message
:
"Received unknown parameter: status"
$paidlist = \Stripe\BalanceTransaction::all(['limit' => 100, 'status'=> 'paid', 'type' => 'charge'], ['stripe_account' => $account_token]);
Well I thought you wanted to get payouts, so I pointed you to the payouts API
Yeah I see
Balance Transactions make sense too if that's what you want. But we don't expose the status property in the List API filters.
In that case, you could get all the balance transfers for the past 30 days and sort them into separate lists depending on the status property
Then total the amount s for each list
Sounds good