#neohmot-payout-reconciliation

1 messages · Page 1 of 1 (latest)

frank bearBOT
#

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
compact crater
#

neohmot-payout-reconciliation

clear minnow
#

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?

compact crater
#

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?

clear minnow
#

The connected account typically has an attached bank account. The bank account is the destination to which the payout is made.

compact crater
#

Okay so you are a Connect platform and trying to reconcile all Payouts for all your connected accounts?

clear minnow
#

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

compact crater
#

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

clear minnow
#

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:"

compact crater
#

So as a platform what you would do is

  1. List all your connected accounts: https://docs.stripe.com/api/accounts/list
  2. For each connected account, list all their Payouts using https://docs.stripe.com/api/payouts/list and passing the connected account id acct_123 in that Stripe-Account header.
  3. 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 the Stripe-Account header
clear minnow
#

I am using the stripe ruby library. Do you know how I set the Stripe-Account header before making the payouts list call?

compact crater
clear minnow
#

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!

compact crater
#

yeah that feature is really neat but not easy to grasp at first 😦