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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With