php – Creating a Stripe Summary Report

php – Creating a Stripe Summary Report

You could use webhooks to be notified when a charge.succeeded or charge.refunded event occurs and store the relevant information in a database you control. That will give you flexibility to do the reporting you need. You can download charges that have already occurred as a CSV from the Stripe dashboard.

You can paginate through the charges by using the count and offset parameters (documented at https://stripe.com/docs/api?lang=php#list_charges). I would suggest using these to process 100 charges at a time. Then you can stop iterating through your charges once you get a charge beyond your date range.

php – Creating a Stripe Summary Report

I received confirmation from a Stripe employee that the only two options are in fact the ones described in the answers from @dwhalen and @Saikat Chakrabarti.

Quoting from the Stripe employee to the same question I asked on Stripe:

Other than the options you described (retrieving all charges, or
tracking in your database as charges come in) there isnt any
alternative way of producing the stats that you want there.

Leave a Reply

Your email address will not be published.