#dgsunesen
1 messages ยท Page 1 of 1 (latest)
In List Balance Transactions API, you can just search for the type: 'payout' and expand data.source field, so that you will be able to find the external account ID under destination field in the Payout object: https://stripe.com/docs/api/payouts/object#payout_object-destination
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Alternatively, you can simply use List Payouts API on the connected account to get the information: https://stripe.com/docs/api/payouts/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
argh, great thanks!
No problem! Happy to help ๐
something like this
const balanceTransactions = await stripe.balanceTransactions.list({ expand: ['data.source'], stripeAccount: 'accountIdHere', });
It should be:
const balanceTransactions = await stripe.balanceTransactions.list(
{
type: 'payout',
expand: ['data.source'],
},
{
stripeAccount: 'acct_xxx',
}
);
Or
const payouts = await stripe.payouts.list({},
{
stripeAccount: 'acct_xxx',
}
);
thank you!
No problem! Happy to help ๐
Within the source I get this
{ id: 'po_1OLEwJRIUZMV8wVM7FSR7Z9Y', object: 'payout', amount: 36670, arrival_date: 1702252800, automatic: true, balance_transaction: 'txn_1OLEwKRIUZMV8wVMrGjpQTsR', created: 1702083763, currency: 'dkk', description: 'STRIPE PAYOUT', destination: 'ba_1Jr145RIUZMV8wVM9CQUp0eK', failure_balance_transaction: null, failure_code: null, failure_message: null, livemode: false, metadata: {}, method: 'standard', original_payout: null, reconciliation_status: 'completed', reversed_by: null, source_type: 'card', statement_descriptor: 'Shouter', status: 'paid', type: 'bank_account' }
would I be able to expand this ba_1Jr145RIUZMV8wVM9CQUp0eK that I get the bank name instead?
I figured ๐
expand: ['data.source.destination']