#elmo - payouts
1 messages · Page 1 of 1 (latest)
ok
So you can listen to the https://stripe.com/docs/api/events/types#event_types-payout.paid webhook event to see when a payout hits your bank account
From there you can list all balance transactions by a payout: https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout
Thank you, is there a way to just pull just the payout balance_transactions ? or do I need to filter these in code?
Ah you just want to do it from the dashboard?
No, I'd like to use the API (using the ruby library)
What do you mean by pull the payout balance_transactions then?
I think the api endpoint I linked will do what you're trying to do, no?
I can pull the payout record, but there's not linkage to the particular charge
for intance:
"id": "po_1KOBE5KkI6JstnPk2FHdS5Ia",
"object": "payout",
"amount": 4794,
"arrival_date": 1643673600,
"automatic": true,
"balance_transaction": "txn_1KOBE5KkI6JstnPkefeQiVAr",
"created": 1643679129,
"currency": "usd",
"description": "STRIPE PAYOUT",
"destination": "ba_184ob4KkI6JstnPkvWzR42ON",
"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"
I need to find the initial charge associated with this payout.
@elder ocean have you looked at the doc my colleague sent you?
They explained what to do. One Payout can have 1 charge, or 10, or 10 millions. So you can't just get them on the Payout
You have to call the List Balance Transactions API and say "please give me all balance transactions bundled in that specific Payout for me to reconcile" and that's done using https://stripe.com/docs/api/balance_transactions/list and passing the parameter payout: 'po_123'
I see, so it's a one to many, ok, I got it thanks.
sure!
I recommend reading https://stripe.com/docs/expand/use-cases#charges-in-payout
thanks again
Of course!