Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get charges(transactions) details in Stripe based on date range

Tags:

I wanted to get a list of charges(Transactions) based on date range I specify, ie all transactions between my specified Start date and End date.

But in CHARGES API, I can not see any Start date nor End Date arguments.

How can I get this?

like image 880
Chirag B Avatar asked Feb 18 '13 07:02

Chirag B


People also ask

How can I see my Stripe charges?

You can see the Stripe fee applied to any successful charge by selecting it from the Payments section of your Dashboard.

Does Stripe sell transaction data?

We do not share End User Personal Data with third parties for their marketing or advertising unless you give us or the third party permission to do so. We do not sell the data of End Users. More. Please see below for information about additional ways in which we may use and share your Personal Data.

What is the minimum charge on Stripe?

The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).


2 Answers

Had a chat with Stripe staffs through online chat, and found that there is a way to get list of charges based on date range.

Stripe Charges API actually has some argument that are not yet listed in their documentation.

Arguments like created[lte] and created[gte] with Unix timestamp can be used, just like Events API call.

EG: https://api.stripe.com/v1/charges?created[gte]=1362171974&created[lte]=1362517574

like image 79
Chirag B Avatar answered Oct 24 '22 12:10

Chirag B


Try this one. It's working for me

$pcharges = Charge::all(
            array(
                'limit'   => 100,
                'created' => array(
                    'gte' => strtotime('-15 day'),
                    'lte' => strtotime('-1 day')
                )
            )
        );

This will return last 15 days data excluding today's transaction. You can set your custom date range as per your requirement.

like image 27
Faisal Avatar answered Oct 24 '22 12:10

Faisal