View Categories

How to Connect Stripe to Google Sheets – Query Payment Data with SQL

Connect · Stripe to Google Sheets

Get data from Stripe into Google Sheets

Pull live rows from your Stripe account into Google Sheets and refresh them whenever you like. No CSV uploads, no Apps Script, no copy-paste. About ten minutes the first time, and the Free plan covers it.

About 10 minutes No coding needed Credentials stay with you Any browser, any device
Stuck at any point? Just ask us. Open Support in Query Streams (top-right menu → Support) and send us a message. Real people read it, and “I don’t know what this screen is asking for” is a perfectly good question.

What you’ll end up with

Stripe logoA Google Sheet showing the live results of a SQL query against your Stripe account, with a button that pulls the latest rows whenever the data changes. Like this:

Stripe holds your data behind its API. Getting it into Google Sheets usually means exporting a CSV from the Stripe dashboard every time you need fresh numbers. Query Streams skips that: a small helper program called the Agent runs the query where your data is, and a Google Sheets add-on asks it for the rows you want. Only the results travel, over an encrypted link, and Google Sheets can be anywhere: any browser on any device.

WHERE THE AGENT RUNSany always-on computer or server with internetYour Stripeaccountkeys stay hereQuery Streams Agentholds the credentialsQuery Streamsencrypted linkover the internet · results onlyWHEREVER YOU AREany browser: laptop, tablet, phone, ChromebookGoogle Sheetsrows arrive in a sheet
The Agent lives with your data. Your sheet lives in Google’s cloud. Open it anywhere and the rows come to you.

What you’ll need

A Query Streams account

The Free plan is enough for this guide. Sign up at my.querystreams.com.

The Agent on any always-on computer

A small program that runs in the background and calls Stripe when Google Sheets asks. It just needs internet access.

Your Stripe login

You will sign in to Stripe once and allow read access. No passwords are typed into Query Streams.

Which computer gets the Agent? Any always-on machine that can already reach your Stripe account. Google Sheets can be anywhere; it runs in your browser.

Connect it in five steps

  1. Create your account

    Go to my.querystreams.com and sign up. Pick the Free plan. It is a real plan, not a trial, and it covers connecting your Stripe account and running queries from Google Sheets.

  2. Install the Agent on any always-on computer

    Sign in, open Download, and install the Agent on any always-on computer or server with internet access. It takes a minute and starts on its own from then on.

    Why a small program instead of a driver? The Agent is one install for Windows, Mac or Linux (about 85 MB on Windows, a little over 100 MB on Mac and Linux) that runs quietly in the background. It makes one outbound, encrypted connection to Query Streams, the same way a browser does, so you open no firewall port and set up no VPN. Your keys stay on that machine, and the rows travel to wherever you are, across the internet if need be. The only thing on your side is the add-on.

    The Download page shows Your Access Key. Paste it into the Agent when it asks, and wait for the badge to read Connected to Query Streams. That is the only thing you do on the Agent itself.

    Full walkthroughs if you want them: Windows, Mac, Linux.

  3. Point it at your Stripe account

    Back in your browser, open Data Agents (under Data in the top menu). Your Agent is listed there. Click Add connector and choose Stripe. Need your Stripe credentials first? Open the walkthrough, then fill in:

    Create your Stripe credentials (about 8 minutes)

    Follow this with Stripe open in another tab. Query Streams keeps what you create here so your Agent can use it, and only ever reads from Stripe.

    Who can do this
    Account owner, Super Administrator, Administrator or Developer (the Stripe roles that can create API keys)
    Recommended
    Restricted API key with Read-only permissions (rk_live_… for live data, rk_test_… for a sandbox)

    Before you start

    • A Stripe login with the Account owner, Super Administrator, Administrator or Developer role. Other roles (Analyst, View Only, Support and so on) cannot create API keys.
    • Access to the email inbox or phone Stripe sends verification codes to. Stripe asks for a code before it creates the key.
    • The Query Streams wizard open in another tab (Data Agents → Add connector → Stripe) with your Agent online, so you can paste the key the moment Stripe shows it.

    Steps

    1. Sign in and choose live data or a sandbox

      Sign in to the Stripe Dashboard. Stripe keeps live data and sandbox (test) data apart, and each has its own keys. For your real payments, stay in your business account, not a sandbox. For test data, open the Dashboard’s account picker, click Sandboxes, and open the sandbox you want.

      A live key cannot read sandbox data, and a sandbox key cannot read live data. If you want both, create one key in each and add each one as its own Stripe connector in Query Streams.

    2. Open the API keys page

      Open the API keys page. From inside the Dashboard you can also click Developers (bottom-left) and choose API keys. The page has two lists: Standard keys (publishable and secret keys) and Restricted keys.

      Using a sandbox? Open the sandbox first (step 1). Each sandbox has its own API keys page and its own keys.

    3. Start a restricted key

      In the Restricted keys list, click Create restricted key. Some accounts show it as + Create restricted key.

      Don’t use the publishable key (pk_…). It can’t read account data. A secret key (sk_…) also works in Query Streams, but it can do anything in your account, including refunds and payouts. Stripe recommends restricted keys, and Query Streams only needs to read.

    4. Say how the key will be used

      Stripe asks how you will use the key. Choose Building your own integration, then click Continue.

      Don’t choose Authorizing agent access to your account. That option tags the key for AI agents and adds Stripe’s approval rules. If you chose Providing this key to another website by mistake, tick Customize permissions for this key on the next screen. If you leave it unticked, Stripe gives the key its default permissions instead of the read-only list in step 7.

    5. Start from no permissions

      Stripe offers ready-made permission templates or a start from zero permissions. Choose to start from zero (pick your own permissions), so every permission begins at None.

      Stripe changes the wording on this screen often. Look for an option worded like Start from scratch or Choose my own, not a template. If the screen is not there, go straight to step 6.

    6. Name the key

      In Key name, type a name you will recognise later, for example Query Streams (read-only).

    7. Set Read on the 13 resources Query Streams syncs

      Each resource row has three choices: None, Read and Write. Click Read on these 13 rows and leave every other row at None. Under Core: Balance, Balance transaction sources, Charges and Refunds, Customers, Disputes, Events, Payment Intents, Payouts, Products. Under Billing: Coupons, Invoices, Prices, Subscriptions. To find a row fast, press Ctrl+F (Cmd+F on a Mac) and type the first word of its name.

      Never choose Write. Query Streams only reads, so a key with only Read can’t create charges, refunds or payouts, even if it leaks. You need Events even if you never sync the events table, because Query Streams reads Stripe’s event list to pick up changes between syncs. If you use Connect, leave the connected-account permissions at None. If a row name doesn’t match what you see, click Read on the All core resources and All Billing resources header rows instead. The key is still read-only, but it can read more than Query Streams uses.

    8. Create the key

      Click Create key.

    9. Enter the verification code

      Stripe sends a verification code by email or text message. Type it into the dialog. If the dialog doesn’t move on by itself, click Continue.

      No code? Check spam, or the phone number on your Stripe profile.

    10. Copy the key

      Stripe now shows the new key. It starts with rk_live_ (or rk_test_ in a sandbox). Click the key value to copy it, then paste it straight into Stripe Secret Key in the Query Streams wizard.

      In live mode, Stripe shows a key you created only this once and can’t reveal it again. Sandbox keys can be revealed at any time. Don’t send the key by email or chat. Query Streams stores it for your Agent and only ever reads with it.

    11. Note where the key is used

      In Add a note, type where the key is used, for example Query Streams Agent on the office computer. Then click Done. The key now appears in the Restricted keys list.

      The note shows up whenever you or a colleague later review your keys, so nobody expires this one by accident.

    Permissions to grant

    ResourceAccessUsed for
    CustomersReadcustomers table. Test connection also reads it first.
    Charges and RefundsReadcharges and refunds tables. One row covers both, and there is no separate Refunds row.
    Payment IntentsReadpayment_intents table
    InvoicesReadinvoices and invoice_items tables. Invoice items have no row of their own.
    SubscriptionsReadsubscriptions and subscription_items tables
    BalanceReadbalance_transactions table (Stripe’s list of balance transactions, formerly called Balance history)
    Balance transaction sourcesReadbalance_transactions table: lets each transaction link to the charge, refund or payout behind it. Stripe says this also grants Read on Balance and Payouts.
    PayoutsReadpayouts table
    DisputesReaddisputes table
    ProductsReadproducts table
    PricesReadprices table
    CouponsReadcoupons table
    EventsReadevents table, and the change feed that keeps customers, subscriptions, invoices, invoice items, charges, payment intents, refunds, disputes, payouts, products, prices and coupons up to date between syncs

    Paste into Query Streams

    Stripe Secret Key
    The restricted key you copied in step 10 (starts with rk_live_ or rk_test_). A secret key (sk_live_ or sk_test_) also works, but it can do far more than read.

    Common problems

    Test connection fails with Invalid API key.

    Why: Part of the key was missed when copying, a space was added, the publishable key (pk_…) was pasted, or someone expired or rotated the key in Stripe.

    Fix: The key must start with rk_ or sk_. Paste it again with nothing before or after it. If you no longer have it (Stripe shows live keys only once), create a new restricted key (steps 3 to 11) and paste that one.

    Test connection says Connected, but some tables stay empty and their sync shows a Stripe permission error (403). Newer Agents also show a warning under Test connection that names the tables the key cannot read.

    Why: The key is missing Read on that table’s row. Stripe’s error message names the missing permission, for example rak_event_read means Events.

    Fix: On the Stripe API keys page, click the ⋯ menu next to the key, choose Edit key, set the missing row to Read, and save. The key itself does not change, so there is nothing to paste again. Click Test connection again in Query Streams.

    Connected, but you only see test data, or the tables are empty even though you take real payments.

    Why: The key comes from a sandbox (rk_test_) when you wanted live data, or the other way round.

    Fix: Check how the key starts. For live data, use the account picker to leave the sandbox, create the key again (steps 2 to 11), then open the connector in Data Agents, click Edit, and paste it into Stripe Secret Key. Keep test and live as separate connectors.

    A connector that used to work stops syncing with Invalid API key.

    Why: Someone rotated or expired the key in Stripe. A rotated key keeps working only until the expiration chosen at rotation, which is at most 7 days.

    Fix: Create a new restricted key, or copy the replacement from the rotation. In Query Streams, open the connector, click Edit, paste the key into Stripe Secret Key, click Test connection, then click Save.

    You can’t see Create restricted key, or the API keys page won’t open.

    Why: Your Stripe role can’t manage API keys. Analyst, View Only and support roles can’t.

    Fix: Ask your Stripe account owner, an Administrator or a Developer to create the key for you, or to change your role.

    Stripe emails you that it blocked a request, and syncs fail even though the key is correct.

    Why: An access policy on the key (IP addresses or Advanced) doesn’t allow the Agent computer’s internet address, or it blocks a VPN or proxy that the computer uses.

    Fix: On the API keys page, click ⋯ next to the key, choose Manage access policy, and either choose a policy that allows the Agent computer’s public IP address or choose None. Then click Save.

    The key was exposed (sent in an email or chat, or saved in a shared file), or someone who had it left your team.

    Why: Anyone holding the key can read everything its permissions allow.

    Fix: On the API keys page, click ⋯ next to the key and choose Rotate key. In Expiration, pick Now to cut off the old key at once, then click Rotate API key. Copy the new key, and paste it into the connector (Edit → Stripe Secret Key → Test connection → Save).

    You want Query Streams to stop reading this Stripe account.

    Why: Deleting the connector does not disable the key. It stays valid in Stripe until you expire it.

    Fix: On the API keys page, click ⋯ next to the key, choose Expire key, and click Expire key again to confirm. Then delete the connector in Data Agents.

    Limits to know

    • Events go back 30 days. Stripe’s event list reaches only 30 days back, so the events table never holds more than the last 30 days. Query Streams also reads events to pick up changes between syncs, so if a connector is switched off for more than about four weeks, its next sync reads its tables again in full.
    • Request speed: Stripe allows 100 API requests per second in live mode and 25 in a sandbox, and most individual endpoints allow 25. Each request returns at most 100 records, so a first sync of 1,000,000 charges is about 10,000 requests, roughly 7 minutes at 25 per second. Sandbox syncs are slower.
    • Monthly read allowance: Stripe expects an account’s read requests to average no more than 500 per transaction over a rolling 30 days, with a minimum of 10,000 a month. Every enabled table makes at least one request each time it syncs, so on a new or low-volume account, set longer sync intervals on tables you don’t need minute by minute.
    • One mode per key: a key reads only the mode it was created in (live, or one particular sandbox).
    • Connect: the key reads your own account’s objects only. Payments on connected accounts are not synced.
    • Showing the key again: Stripe shows a live key you created only once, while sandbox keys can be revealed at any time. When you rotate a key, the old one keeps working for at most 7 days.

    Steps verified 8 October 2026. Sources: docs.stripe.com/keys, docs.stripe.com/keys/restricted-api-keys, docs.stripe.com/keys-best-practices, docs.stripe.com/stripe-apps/reference/permissions, docs.stripe.com/sandboxes, docs.stripe.com/testing-use-cases, docs.stripe.com/rate-limits, docs.stripe.com/api/events/list, docs.stripe.com/api/balance_transactions/list, docs.stripe.com/api/errors, docs.stripe.com/get-started/account/teams/roles, docs.stripe.com/workbench, support.stripe.com/questions/plugin-user-migration-guide, stripe.com/sessions/2026/building-security-first-stripe, posthog.com/docs/cdp/sources/stripe, help.chaserhq.com/use-chaser-with-stripe, homerunner.io/docs/creating-stripe-restrict-key-for-homer…, chargebee.com/docs/reveal/transactions/get-started/stripe…, nango.dev/docs/api-integrations/stripe-api-key/connect, fivetran.com/docs/connectors/applications/stripe/troubles….

    Connection name
    Any name you will recognise later, like Sales database.
    Stripe Secret Key
    Your Stripe secret key from the Stripe Dashboard under Developers, API keys; it starts with sk_live_ or sk_test_.

    Click Test connection. When it reads Connected, click Save. The connection reaches your Agent within a few seconds.

    Test failed? Usually a missing permission, or a credential from the wrong Stripe account. The walkthrough above lists the common problems and their fixes.

  4. Add Query Streams to Google Sheets

    Open any Google Sheet, go to Extensions → Add-ons → Get add-ons, search for Query Streams, and click Install. Or install it straight from Query Streams on the Google Workspace Marketplace. Google will ask you to allow the add-on; that is normal.

    Afterwards it is in every Google Sheet you open: a Query Streams icon in the side panel on the right, also listed under Extensions. There is no separate sign-in. It recognises the Google account you are already using, so that email needs to be the one on your Query Streams account.

  5. Pull in your first table

    Click the Query Streams icon in the side panel on the right of the sheet (or find it under Extensions). Choose Query Streamer and pick the connection you just made.

    Type the query you want to run. This one pulls a few columns from a stripe.invoices table:

    Example · SQL
    SELECT number, status, amount_due / 100.0 AS amount_due, currency
    FROM stripe.invoices
    ORDER BY created DESC
    LIMIT 100;

    Under Destination Sheet pick the tab the rows should land in, then click Run Query. The rows land in that tab in a second or two. Click Run Query again any time the data has changed and the tab updates in place.

    Don’t know SQL? Build the query in the Query Streams portal instead. Query Builder shows your tables and columns so you can point and click. On Business plans you can also ask Nova in plain English (“show me customers in the USA”) and it writes the SQL for you. Save the query and it is one click away in the portal, and in the add-on’s Saved Queries list from Personal Core up.

That’s it. Your data is in the sheet and stays current with one click. Nothing left your network except the rows you asked for.

Good next moves

  • Save the query in the portal so you can run it again with one click, from Google Sheets or Excel.
  • Add a filter such as a date range, so the same query can answer “this month” without editing.
  • Share the results with a colleague. They see the rows, not your credentials.

Questions people ask

Does your Stripe account have to be on the computer I use Sheets on?

No. Only the Agent has to be where your Stripe account is. Google Sheets runs in your browser on any device. Open the add-on with the same Google account and your connections are there.

Does my data get copied to Query Streams?

No. The Agent runs the query where your data is and sends only the rows it returns. Nothing is synced or stored in between.

Does the Free plan really cover this?

Yes. Free is a plan you keep, not a trial that expires. See exactly what it includes on the pricing page.

Does the sheet refresh by itself?

Click Run Query again whenever you want the latest rows. For a sheet that refreshes on a schedule without anyone pressing anything, set up an Automation in the Query Streams portal (Streams → Automation). It is on every plan.

Still stuck? Open Support in Query Streams and tell us which step you are on and what you see. We will get you connected.
Query Streams also connects the same data toExcelClaude, Cursor and ChatGPTa REST APIand more

Every guide for Stripe

Setup trouble?

  • Agent shows Offline, or Test connection and Browse are greyed out? Check that the Agent is online → Is the Agent online?
Updated on October 8, 2026

Powered by BetterDocs