Listing Stripe refunds between dates

1k Views Asked by At

Using the Stripe API, I'm struggling to work out how to list refunds between two dates.

I can list charges between two dates, but as the refund can come at a date significantly after the charge date, it is not good.

Thanks for anyone who can point me in the right direction!

2

There are 2 best solutions below

0
On BEST ANSWER

I would use the List All Balance History API and pass type: "refund" to only list the refunds and also pass the created hash based on the dates I want to limit my search to and you should get all the balance transactions associated with a refund created between those two dates.

2
On

A dictionary with dates is working for me even though the API docs don't show this as an option for Refund.list:

epoch_dict = {'lt': 1496505600, 'gte': 1496502000}
refunds = stripe.Refund.list(limit=100, created=epoch_dict)