#neohmot-payout-reconciliation
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- neohmot, 48 minutes ago, 6 messages
neohmot-payout-reconciliation
@clear minnow https://docs.stripe.com/expand/use-cases#charges-in-payout might help. It explains how to figure out what is bundled in a given Payout. What I would do is use the List Payouts API https://docs.stripe.com/api/payouts/list and then for each Payout I would list what's in it (based on that first link) until you have ingested all the data you need
I believe the payouts list requires the destination account, which I believe is the external account on the connected account. I have the account id of the connected account, but not the account id of the destination (i.e. bank) account.
Is there a way to get a list of payouts related to a connected account?
Where I would pass in the account_id of the connected account?
Sorry I'm a bit confused now. You talk about a "destination" (which usually is the bank account where the funds went) but also of a connected account which is separate. Can you give me a bit more context on what you are asking?
The connected account typically has an attached bank account. The bank account is the destination to which the payout is made.
Okay so you are a Connect platform and trying to reconcile all Payouts for all your connected accounts?
yes!
I did find that I could look up the bank account using the following:
Stripe::Account.list_external_accounts(
'acct_1OcYqnLmGDgWopTM',
{object: 'bank_account'},
)
Where the account id is that of the connected account
An ExternalAccount represents a bank account or card where funds are going to be sent. A Stripe account can have one or multiple. It's ba_123 or card_123
A connected account represents another account/entity connected to your platform. You can have 0, 1 or millions. It's acct_123
As a platform you can make calls on a connected account where you use the Stripe-Account header and pass the connected account id acct_123 in it.
You can also list Payouts without needing to pass destination or any ba_123 or card_123 at all
But then when I try to use the id of the external account that is returned in the above query to look up the related payouts, I get "No such external account:"
So as a platform what you would do is
- List all your connected accounts: https://docs.stripe.com/api/accounts/list
- For each connected account, list all their Payouts using https://docs.stripe.com/api/payouts/list and passing the connected account id
acct_123in thatStripe-Accountheader. - For each Payout on that connected account, use the List BalanceTransactions API https://docs.stripe.com/api/balance_transactions/list and pass
payout: 'po_123'to list what's in that Payout (Again with the same connected account id in theStripe-Accountheader
I am using the stripe ruby library. Do you know how I set the Stripe-Account header before making the payouts list call?
https://stripe.com/docs/connect/authentication#stripe-account-header explains this in details for all languages
Ah, so for any api call, I can include a stripe_account value in a second set of attributes, like this Stripe::Payout.list({}, { stripe_account: 'acct_1234' })
That wasn't clear to me that all of the api calls (or a suppose most of them anyway) can be altered to include that stripe_account value.
That clears up alot. Thank you!
yeah that feature is really neat but not easy to grasp at first 😦