How to get Stripe data into Google Sheets
By Jake Marsh · Updated
To get Stripe data into Google Sheets, create a restricted read-only key in Stripe, then in Extensions > Cellfetch > Open click New request, pick Stripe under Start from and add the key as a connection. The preset is set up for Stripe's pagination and its customers list; change the URL to /v1/charges, /v1/invoices, /v1/subscriptions or /v1/payouts for other data. Click Save and run, and set Refresh automatically to keep the tab current.
Make a read-only key first
In the Stripe Dashboard, go to Developers > API keys and create a restricted key (it starts with rk_live_). Give it Read access to only what you'll import, for example Customers and Charges, and nothing else. A restricted key can't move money or change your account, even if someone saw it.
Steps
- Choose Extensions > Cellfetch > Open, then New request and Stripe.
- Add the connection. Under Connection (authentication), paste the restricted key as a Bearer token. The connection is only sent to
api.stripe.com. - Pick the data. The URL starts as
https://api.stripe.com/v1/customers. Swap the last part for the list you want. - Choose the columns. The preset starts with id, email, name, created and metadata. For charges you might use:
id
amount
currency
status
customer
created as Created (unix)
billing_details.email as Email
- Dates: Stripe sends dates as Unix timestamps (seconds), not ISO dates. Add a column next to the data with a formula such as
=F2/86400+DATE(1970,1,1)and format it as a date. - Click Preview, then Save and run. Cellfetch follows Stripe's pages (100 records each, using
starting_after) up to the Max pages per run you set. - Set Each run. Replaces the previous results rebuilds the tab each time. Updates matching rows, adds new ones with key column
idkeeps rows in place and adds new ones.
Report ideas
- Monthly revenue: charges with status
succeeded, a pivot table by month of the created date. - Failed payments to follow up: charges where status is
failed, refreshed daily. - Subscriptions by plan:
/v1/subscriptionswithitems.data[0].price.idas a column. - Payout reconciliation:
/v1/payoutsnext to your bank export.
Amounts from Stripe are in the smallest currency unit, so 1999 means $19.99. Divide by 100 in a formula column for dollars.
Filtering by date
Stripe lists accept created[gte] as a query parameter with a Unix timestamp. Put the timestamp in a cell, say Settings!B2, and use {{Settings!B2}} as the parameter's value. Change the cell to change the range.
What it costs
The trial is 50 runs or 14 days, whichever comes first. Then $15 a month or $144 a year. Install from the Cellfetch page.
Cellfetch: API & JSON Importer for Sheets
Import any API or JSON into Google Sheets, on a schedule $15 a month or $144 a year per Google account.
Questions
Is it safe to put a Stripe key in Google Sheets?
Cellfetch doesn't store it in the sheet. Connections live in your own Google account, other editors can't see or use them, and the key is only sent to api.stripe.com. Use a restricted read-only key all the same.
Can I import more than 100 Stripe records?
Yes. Cellfetch follows Stripe's pages for you. The preset reads up to 50 pages a run, which you can change under Pages.
Can it import Stripe data for more than one account?
Yes. Add one connection per account and one request per account.
Does it write anything back to Stripe?
No. With a read-only key it can't, and the requests are reads.