#dgsunesen

1 messages ยท Page 1 of 1 (latest)

warm wadiBOT
steady thistle
#

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

onyx meteor
#

argh, great thanks!

steady thistle
#

No problem! Happy to help ๐Ÿ˜„

onyx meteor
#

something like this

const balanceTransactions = await stripe.balanceTransactions.list({ expand: ['data.source'], stripeAccount: 'accountIdHere', });

steady thistle
#

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',
  }
);
onyx meteor
#

thank you!

steady thistle
#

No problem! Happy to help ๐Ÿ˜„

onyx meteor
#

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']