#riven-payout-paymentintent

1 messages · Page 1 of 1 (latest)

visual shuttle
#

@tall ferry 👋 let me read and catch up, the channel is a bit busy

tall ferry
#

Thanks @visual shuttle

visual shuttle
#

Unfortunately there isn't a simple/direct way. The feature you are seeing is only for the Dashboard and it's not something we expose in the API. Running a Report is the simplest/best way.
Alternatively you can use the List Balance Transactions API https://stripe.com/docs/api/balance_transactions/list and pass payout: 'po_123' to paginate through all the transactions bundled in that Payout. And if you do this for all Payouts as they get created, you cache all the information in your database to have access to that information as you need

tall ferry
#

Thank you very much. Just tested it out. Looks like if I grab the charge s from the list, I can find the linked payment intent from each charge. Thank you!

visual shuttle
#

@tall ferry you can also expand it all in one call

#

So when you call https://stripe.com/docs/api/balance_transactions/list, you can pass expand: ['data.source.payment_intent'] for example and get both the BalanceTransaction, its corresponding "source" that caused it the Charge and the original PaymentIntent all in one call

tall ferry
#

ah yes! Perfect. I did not think to expand the source because it could potentially be of different types... however by specifying type: "charge" in my list args, the source is always the same type.

#

Thanks!

visual shuttle
#

yeah source will be many things like Payout, Refund, etc.

#

but you can then adapt based on all of them