How to get Stripe subscriptions from Zapier
21 Jan 2022
The Stripe API allows you to fetch a list of your subscriptions by date range using the
created param. To get a date range, you have to pass the value as a dictionary. This is where I got stuck - it took me way too long to figure out how to pass a dictionary from Zapier. I’m used to having
fetch available, or an API client library.
How do you pass dictionary params to Stripe from a Zapier webhook?
The key was figuring out that Stripe’s API requires a
GET request, and that dictionary params would have to be formatted with square brackets like this
created[gte]. So to get a range of subscriptions, the Query String Params should be:
The values on the right are Unix timestamps as per Stripe’s documentation.
How do you get a range of Stripe subscriptions from Zapier?
The final result was a Webhook GET task setup like this:
Query String Params:
Send as JSON: No
Here’s a picture:
Hope I saved you some time :)
If you want to follow along as I learn to build a business, you can follow me on Twitter or enter your email below.
Email subscribers will know first when I write new articles and release products. I value your trust and will repay it in kind.