#eze-payout-transactions
1 messages · Page 1 of 1 (latest)
You can use the https://stripe.com/docs/api/balance_transactions/list + payout: 'po_123' to see which transactions are bundled in that Payout
You can also use https://stripe.com/docs/expand as a feature to get more details so you can go from BalanceTransaction to Charge to the Invoice to the Subscription for example
https://stripe.com/docs/expand/use-cases#charges-in-payout is a good read for this
I try, but it's not work: const balanceTransactions = await stripe.balanceTransactions.list({
payout: 'po_1LRnADRTXyEArZQLIbxzoQix',
});
what isn't working exactly?
what does "return empty" mean? That Payout has one transaction in it so the response would not be empty
yes, sorry, "errorMessage": "No such payout: 'po_1LRnADRTXyEArZQLIbxzoQix'".... but the po is from a hook
data:
{
object: {
id: 'po_1LRnADRTXyEArZQLIbxzoQix',
object: 'payout',
amount: 600,
arrival_date: 1659312000,
automatic: true,
balance_transaction: 'txn_1LRnAERTXyEArZQLaHdYoje9',
created: 1659316281,
currency: 'usd',
description: 'STRIPE PAYOUT',
destination: 'ba_1LPu0hRTXyEArZQLPe4tdLN8',
failure_balance_transaction: null,
failure_code: null,
failure_message: null,
livemode: false,
metadata: {},
method: 'standard',
original_payout: null,
reversed_by: null,
source_type: 'card',
statement_descriptor: null,
status: 'paid',
type: 'bank_account'
}
cool so you get a really clear error, not no result
and that error is because the Payout is on a connected account but you make the call on your own account where it doesn't exist
if you make a call on behalf of a connected account you have to use https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
it's covered in details in the last doc I gave you