Search API Connector Documentation
Import Stripe Data to Google Sheets
In this guide, we’ll walk through how to pull transactions from the Stripe API directly into Google Sheets, using the API Connector add-on for Google Sheets. Stripe is of course a popular payment processor known for its fantastic APIs.
There are 2 ways to connect to the Stripe API:
- Preset “Connect” button (OAuth) premium
- Personal API key. Please check the appendix for detailed instructions to retrieve your key.
Contents
- Before You Begin
- Part 1: Connect to the Stripe API
- Part 2: Fetch Data from Stripe
- Part 3: Create a Custom API Request
- Part 4: Fetch and Append New Data
- Part 5: Handle Pagination
- Part 6: API Documentation
- Appendix: Connect with a Stripe API Key
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the Stripe API
The easiest way to get started with the Stripe API is through API Connector’s built-in integration. Please note: you must have the Administrator role in Stripe to access this connection. To see your account role, check your Profile page.
- Select Stripe from the drop-down list of applications
- Under Authorization, click Connect to Stripe
- You’ll be asked to authorize the connection. Click Connect.
- Once you connect the account, you’ll be returned to your Google Sheet and can verify that the connection is active.
Part 2: Fetch Data from Stripe
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose
/charges
to get a list of charges for your account. - Optionally set the
created
or other parameters to filter by date or other measures. - Select a destination sheet, name your request, and click Run.
Part 3: Create a Custom Request
Alternatively, you can create a custom request instead of using API Connector’s built-in integration. When you create a custom request, you add your complete URL into the request URL field, and choose Stripe from the OAuth menu.

To easily convert your preset request to a custom request, click Output Options > More Options > Add Request URL. This will print your URL into your sheet where you can copy and paste it into a custom request.
Part 4: Fetch and Append New Data
Rather than retrieving the entire data set each time you run your request, you can set your request to fetch new data only. There are a few approaches you could take; here’s one:
- Run an initial (custom) request like
https://api.stripe.com/v1/charges?limit=100
- Use the field editor to select just the fields you want and assign them to specific columns in your report.
- Create a new sheet called Inputs that contains this function:
=max(Charges!F:F)
. That will grab the most recent date from the API response (change F:F to whichever column holds your create date) - Switch your request to Append mode and use that maximum date in your request URL like this:
https://api.stripe.com/v1/charges?limit=100&created[gt]=+++Inputs!B2+++
. created[gt]
means ‘created greater than’, so this will ensure that each request only retrieves new data, and append mode will add that new data to the end of your existing dataset.- Set your request to run on a schedule. You won’t need to update your request again.
Part 5: Handle Pagination
- By default, Stripe will only return 10 records at a time. To retrieve more, use the ‘limit’ and ‘starting_after’ parameters as described in their documentation.
- You can run these request URLs manually, or loop through them automatically using pagination handling (paid feature), like this:
- Pagination type:
cursor
- Next token parameter:
starting_after
- Next token path:
data.id
- Run until: choose when to stop fetching data
- Pagination type:
Part 6: API Documentation
Official API documentation: https://stripe.com/docs/api
Appendix: Connect with a Stripe API Key
- As a free alternative to connecting via OAuth, you can connect with your own API key. Log in to Stripe and click Developers > API keys from the left-hand menu
- On this page, you’ll see that API keys have already been automatically created for you. Click Reveal live key to see your key. That’s it, you have your key.
- To use your key, add it to the Headers section, where Key = Authorization, Value = Bearer your_key
- Since you’re connecting with an API key, leave OAuth set to None.
Hi, I used the API connector to get my Stripe charges into a g-sheet. all works fine but the amounts are somehow coming in a wrong format. e.g. a payment of EUR 11,25 is flowing in as 1125,00. Strange enough, it looks as payments >EUR 100,00 are formatted correctly. Does anyone have a hint?
Hi Guy, Stripe reports data in the smallest currency unit, e.g. $10 will be reported as 1000. Can you add a column that divides by 100?
Dear Ana,
thank you very much for your great support. I could solve the issue by dividing by 100. Fantastic tool.
Guy
Nice, simple solutions are the best 😀
Hi Ana,
is there an issue with the API “balance”. All APIs seem to be working fine but for “balance” I always get this error message, even though I am using the same parameters as for the other requests:
Completed with errors
– Server responded with an error (400) show response{ “error”: { “code”: “parameter_unknown”, “doc_url”: “https://stripe.com/docs/error-codes/parameter-unknown”, “message”: “Received unknown parameter: limit”, “param”: “limit”, “type”: “invalid_request_error” } }
Based on the error message, you need to remove the “limit” parameter from your URL, can you try that?
Hi, on my side it works with customers, subscriptions… but not with “https://api.stripe.com/v1/promotion_codes?limit=100” (even if it’s listed here : https://stripe.com/docs/api/promotion_codes).
We always have the message “Failed to run requests”
Any help ?
I tested and it worked fine for me, but I only have 2 promotion codes in my account.
“Failed to run request” means that the request timed out, so I suppose you might run into this issue if you have a very large number of promotion codes, do you think that’s the case here?