Import Stripe Data To Google Sheets

Import Stripe data to Google Sheets
Reading Time: 4 minutes

Stripe is a popular payment processor that helps businesses manage their payment, subscriptions and several other things making online transactions seamless and easy. Using its API, we can integrate Stripe into Google Sheets. We can then import Stripe data to Google Sheets, update a customer, create a refund, and get a list of all transactions, to name but a few.

This article will walk you through how to integrate Stripe to Google Sheets using some simple examples–which hopefully will be able to help you create more sophisticated tools.

To import Stripe data to Google Sheets, the following are the steps involved:

  1. Getting API key
  2. Choosing the data endpoint
  3. Retrieving the data

Before we proceed to the steps, we need to install an extension that will allow us to connect Stripe to Google Sheets. It’s called Amigo Data. It’s free for limited use and is easy to use. You can get it from here.

Once you’ve got the extension installed, we can get on to the business.

Steps to import Stripe data to Google Sheets

Step 1: Get the Stripe API key

Log in to your Stripe account and navigate to the developer section by clicking Developers.

Navigating to the developers page

Then click API keys.

Stripe developer page

The API key is pre-generated and so no additional step is required. Click on Reveal test key to uncover the Secret key and copy it. We’ll use it later on to import Stripe data to Google Sheets.

The keys

If, however, you want to create restricted keys that limit access and permissions for different information, you can click the Create restricted key button and grant the permission for each area.

Step 2: Choose the data endpoint

Go to the Stripe API documentation page https://stripe.com/docs/api

On the left side of the page is a list of available endpoint categories. Select the one under which the desired data is placed. For example, to retrieve a list of all customers, expand the Customers category and select List all customers.

List of endpoints under Customers category

On the right is found the base endpoint URL for the selected data. Note the URL and also the key.

The endpoint URL

Step 3: Retrieve the data

Open Google Sheets and launch Amigo Data by clicking Extensions→Amigo Data→Connect.

Launch Amigo Data

You’ll be presented with a list of sources to connect to. Select Custom API.

Select Custom API as the source to connect

Paste the endpoint URL in the API URL field.

Entering the endpoint URL

Expand the Details tab and enter the following as a header.

Name: Authorization, Value: Bearer YOUR_SECRET_KEY

Header name and value

You can then proceed to import the data by clicking the preview button and then importing them. However, by default, the API will return only 10 values.

To retrieve more data and also filter them by date and/or other parameters, we click the “+QUERY” button and filter the result by using one or more of the parameters mentioned.

For example, to fetch 100 results (the maximum value) we enter the following query.

Name: limit, value: 100

And to get results for data created on or after a certain date, we’ll use the created.gte parameter with date in Unix timestamp as the value.

Entering query parameters in Amigo Data

After filling in the details, click the PREVIEW button. Then flatten and expand the nested data sets and click the IMPORT button.

You can likewise fetch other types of data such as a list of all transactions, transfers information, invoices, list of all prices and so on.

See the Stripe API documentation for more details.

After you’ve connected Stripe to Google Sheets with Amigo Data, you can let Amigo Data pull the data automatically into Google Sheets so that you need not repeat the process each time you want to data. You need only set a refresh schedule in Amigo Data and it’ll update the data at regular intervals–hourly, daily, weekly or on certain days of the week. Click here to learn more about it.

Some recommended articles:
Import TD Ameritrade data to Google Sheets

Export Google Analytics Data to Google Sheets

Export Facebook Ads Data to Google Sheets