#sanjeev-revenue
1 messages · Page 1 of 1 (latest)
heya @high acorn, the way you're planning to do it i.e. fetching the PaymentIntents sound fine to me, do you have any specific concerns?
yes my concern is that there will be so many loops. i.e. i will fetch list of pi and fetch balance transactions for each pi since need fees as well.
then will fetch list of refunds and balance transaction fir each refunds as well.
and dispute case is also there
Moreover there will be pagination for pi and refunds as well
Will this be feasible with all these loops?
hmmm, maybe you can consider using one of the reports here instead : https://stripe.com/docs/reports/report-types ?
is there any report api where i can pass payment intent id and get all details of anount, refunds and fees
I want a report like this. I took this screenshot from stripe dashboard
one option here is to expand certain fields/parameters in the object when making the request : https://stripe.com/docs/api/expanding_objects
For example, you can expand the source in the BalanceTransaction object to get the PaymentIntent id, but there's ultimately no single endpoint where you can get all the PaymentIntent id and refunds and fees.
You're going to need to piece the data together yourself. It would be easier if you saved these information into your DB as you receive them and then queried your DB for these details.