Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find charges contained in a Stripe payout

Given a Stripe Payout (po_1BRxlK...), how can I determine which charges are contained in this payout? Right now the balance transactions in the API seems like a complete mess.

I've tried searching for all charges between two payouts, but due to the holding period of charges, there might be a shift of a few dates. How would you recommend to match payouts with charges?

I can see that within the Stripe Dashboard, you can see all transactions in a payout, so I assume it's possible to get the same data somehow via the API.

Thanks in advance.

like image 857
Hedam Avatar asked Dec 18 '17 10:12

Hedam


2 Answers

You can use the List all balance history endpoint to do that: https://stripe.com/docs/api/php#balance_history-payout

If you pass the payout id to the payout parameter you'll get back the list of all balance transactions aggregated in the payout. It only works with automatic payouts though.

like image 179
Spiff Avatar answered Sep 21 '22 12:09

Spiff


You can achieve this by using Report API and API report type: balance_change_from_activity.itemized.1

For more info refer - https://stripe.com/docs/reports/financial-reports/api

Report Schemas - https://stripe.com/docs/reports/financial-reports/report-schemas

For quick reference - you can view the payout reconciliation from dashboard under Reports section.

like image 38
iravinandan Avatar answered Sep 25 '22 12:09

iravinandan