Stripe Reports with API

I want to create automation to download a monthly report from Stripe with the month’s transactions. As I see, these reports can be created and downloaded in CSV format via the Stripe API.
I’m new to this, and I would like if someone could guide me on what type of code I should use to achieve this.
Here you can see the Stripe API documentation that indicates how to make this call to create the report and then how to download it.

https://docs.stripe.com/reports/api

But I have doubts:

  1. In Make, do I have to make a call to Stripe using the HTTP module?
  2. Which one should I choose to be able to include my secret API key?
  3. What type of code should I use? Because in the Stripe documentation, I see Curl and others, but I’m not sure which one to really use.

You can use the Stripe universal module instead of HTTP.

Screenshot_2024-04-05_090445

Usually we will refer to the cURL version.

In Stripe’s case the Node version is not very useful because they are using an NPM library to abstract the HTTP request, so you need to go to the ACTUAL API reference by clicking on this link:

and it will display the available parameters you can send

Screenshot_2024-04-05_100417

2 Likes

Ok, that has become more or less clear to me, the problem is that I don’t know exactly how to translate that call and parameters that Stripe indicates to me and include it in the http module’s post call. I was doing something like this to Create the report, but it doesn’t work for me.


I must be entering the parameters incorrectly because it gives me an error that it does not receive the type of report that I am supposed to be specifying.

According to Stripe API Reference,

(the API) accepts form-encoded request bodies, returns JSON-encoded responses

Screenshot_2024-04-05_160401

So, you cannot send JSON as they expect the BODY of the HTTP request to be “Application/x-www-form-urlencoded”.

This is how you would do it

3 Likes

Thank you, that way I have managed to get it to work correctly!!

1 Like

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

2 Likes