Wyświetl kategorie

Jak połączyć Stripe z Arkuszami Google - zapytanie o dane płatności za pomocą SQL

Połącz · Stripe z Arkuszami Google

Pobierz dane z Pasek do Arkusze Google

Przenieś aktywne wiersze z konta Stripe do Arkuszy Google i odświeżaj je, kiedy tylko chcesz. Bez przesyłania plików CSV, bez skryptów Apps Script, bez kopiowania i wklejania. Za pierwszym razem zajmie to około dziesięciu minut, a plan darmowy to obejmuje.

Około 10 minut Nie potrzeba kodowania Poświadczenia pozostają z Tobą Dowolna przeglądarka, dowolne urządzenie
Utknąłeś w jakimś momencie? Po prostu zapytaj nas. Otwórz Wsparcie w Query Streams (menu w prawym górnym rogu → Wsparcie) i wyślij nam wiadomość. Przeczytają ją prawdziwi ludzie, a pytanie „Nie wiem, o co pyta ten ekran” jest jak najbardziej trafne.

Co z tego wyjdzie?

Logo w paskiArkusz Google pokazujący na żywo wyniki zapytania SQL na Twoim koncie Stripe, z przyciskiem pobierającym najnowsze wiersze po każdej zmianie danych. Na przykład:

Stripe przechowuje Twoje dane za pośrednictwem swojego API. Przeniesienie ich do Arkuszy Google zazwyczaj oznacza eksport pliku CSV z pulpitu Stripe za każdym razem, gdy potrzebujesz nowych danych. Query Streams pomija ten problem: mały program pomocniczy o nazwie Agent uruchamia zapytanie w miejscu, w którym znajdują się Twoje dane, a dodatek do Arkuszy Google pyta go o żądane wiersze. Tylko wyniki przesyłane są szyfrowanym łączem, a Arkusze Google mogą być dostępne w dowolnym miejscu: w dowolnej przeglądarce na dowolnym urządzeniu.

GDZIE DZIAŁA AGENTdowolny stale włączony komputer lub serwer z dostępem do InternetuTwój pasekkontoklucze zostają tutajAgent strumieni zapytańposiada uprawnieniaStrumienie zapytańszyfrowane łączeprzez internet · tylko wynikiGDZIEKOLWIEK JESTEŚdowolna przeglądarka: laptop, tablet, telefon, ChromebookArkusze Googlewiersze docierają do arkusza
Agent żyje z Twoimi danymi. Twój arkusz znajduje się w chmurze Google. Otwórz go w dowolnym miejscu, a wiersze same się pojawią.

Czego będziesz potrzebować

Konto Query Streams

Plan darmowy wystarczy do tego poradnika. Zarejestruj się na my.querystreams.com.

Agent na dowolnym komputerze stale włączonym

Mały program, który działa w tle i wywołuje Stripe, gdy Arkusze Google o to proszą. Wymaga jedynie dostępu do internetu.

Twoje logowanie do Stripe

Zalogujesz się do Stripe raz i zezwolisz na dostęp do odczytu. Do strumieni zapytań nie są wpisywane żadne hasła.

Który komputer ma Agenta? Dowolna maszyna stale włączona, która może już połączyć się z Twoim kontem Stripe. Arkusze Google mogą być dostępne wszędzie; działa w Twojej przeglądarce.

Podłącz w pięciu krokach

  1. Utwórz swoje konto

    Przejdź do my.querystreams.com i zarejestruj się. Wybierz Bezpłatny plan. To prawdziwy plan, a nie wersja próbna, obejmujący podłączenie konta Stripe i uruchamianie zapytań z Arkuszy Google.

  2. Zainstaluj agenta na dowolnym komputerze stale włączonym

    Zaloguj się, otwórz Pobieraći zainstaluj Agenta na dowolnym komputerze lub serwerze z dostępem do internetu, który jest stale aktywny. Zajmie to minutę i od tego momentu uruchomi się automatycznie.

    Dlaczego mały program, a nie sterownik? Agent to pojedyncza instalacja dla systemów Windows, Mac lub Linux (około 85 MB w systemie Windows, nieco ponad 100 MB w systemach Mac i Linux), która działa cicho w tle. Nawiązuje jedno szyfrowane połączenie wychodzące do strumieni zapytań, tak jak robi to przeglądarka, więc nie otwierasz portu zapory sieciowej ani nie konfigurujesz sieci VPN. Twoje klucze pozostają na tym komputerze, a wiersze danych są przesyłane do Ciebie, gdziekolwiek jesteś, przez internet, jeśli zajdzie taka potrzeba. Jedyne, co musisz zrobić, to zainstalować dodatek.

    Strona pobierania pokazuje Twój klucz dostępuWklej to do agenta, gdy o to poprosi i poczekaj, aż odznaka zostanie odczytana Połączono ze strumieniami zapytańTo jest jedyna rzecz, którą robisz na samym Agencie.

    Pełne opisy przejść, jeśli ich potrzebujesz: Okna, Prochowiec, Linux.

  3. Skieruj go na swoje konto Stripe

    Wróć do przeglądarki i otwórz Agenci danych (pod Dane (w górnym menu). Twój agent jest tam wymieniony. Kliknij Dodaj złącze i wybierz Pasek. 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)
    Zalecony
    Restricted API key with Read-only permissions (rk_live_… for live data, rk_test_… for a sandbox)

    Zanim zaczniesz

    • 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

    ResourceDostępUsed for
    KlienciCzytaćcustomers table. Test connection also reads it first.
    Charges and RefundsCzytaćcharges and refunds tables. One row covers both, and there is no separate Refunds row.
    Payment IntentsCzytaćpayment_intents table
    InvoicesCzytaćinvoices and invoice_items tables. Invoice items have no row of their own.
    SubscriptionsCzytaćsubscriptions and subscription_items tables
    SaldoCzytaćbalance_transactions table (Stripe’s list of balance transactions, formerly called Balance history)
    Balance transaction sourcesCzytaćbalance_transactions table: lets each transaction link to the charge, refund or payout behind it. Stripe says this also grants Read on Balance and Payouts.
    PayoutsCzytaćpayouts table
    DisputesCzytaćdisputes table
    ProduktyCzytaćproducts table
    CenyCzytaćprices table
    CouponsCzytaćcoupons table
    EventsCzytaćevents 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

    Klucz tajny Stripe
    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….

    Nazwa połączenia
    Jakąkolwiek nazwę, którą później rozpoznasz, np. Baza danych sprzedaży.
    Klucz tajny Stripe
    Twój tajny klucz Stripe znajdziesz w Panelu Stripe w sekcji Deweloperzy, klucze API; zaczyna się od sk_live_ lub sk_test_.

    Kliknij Połączenie testowe. Kiedy to czyta Połączony, kliknij ZapiszPołączenie zostanie nawiązane z Twoim agentem w ciągu kilku sekund.

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

  4. Dodawanie strumieni zapytań do Arkuszy Google

    Otwórz dowolną Arkusz Google i przejdź do Rozszerzenia → Dodatki → Pobierz dodatki, wyszukaj Strumienie zapytańi kliknij Zainstaluj. Lub zainstaluj go bezpośrednio z Strumienie zapytań w sklepie Google WorkspaceGoogle poprosi Cię o zezwolenie na instalację dodatku, jest to normalne.

    Następnie jest on dostępny w każdym otwartym Arkuszu Google: ikona strumieni zapytań w panelu bocznym po prawej stronie, również wymieniona pod RozszerzeniaNie ma osobnego logowania. Rozpoznaje konto Google, którego już używasz, więc adres e-mail musi być adresem przypisanym do Twojego konta Query Streams.

  5. Przyciągnij swój pierwszy stolik

    Kliknij ikonę Strumienie zapytań w panelu bocznym po prawej stronie arkusza (lub znajdź ją pod Rozszerzenia). Wybierać Streamer zapytań i wybierz połączenie, które właśnie utworzyłeś.

    Wpisz zapytanie, które chcesz uruchomić. To zapytanie pobiera kilka kolumn z stripe.invoices tabela:

    Przykład · SQL
    WYBIERZ liczbę, status, kwotę_należną / 100,0 JAK kwota_należna, walutę Z stripe.invoices ZAMÓW WEDŁUG utworzone OPIS LIMIT 100;

    Pod Arkusz docelowy wybierz zakładkę, na której mają znaleźć się wiersze, a następnie kliknij Uruchom zapytanieWiersze trafiają na tę kartę w ciągu sekundy lub dwóch. Kliknij ponownie „Uruchom zapytanie” za każdym razem, gdy dane ulegną zmianie, a karta zostanie zaktualizowana.

    Nie znasz SQL? Zamiast tego utwórz zapytanie w portalu Query Streams. Kreator zapytań Wyświetla tabele i kolumny, dzięki czemu możesz je wskazać i kliknąć. W planach biznesowych możesz również zapytać Novę w prostym języku angielskim („pokaż mi klientów w USA”), a ona napisze za Ciebie kod SQL. Zapisz zapytanie i będzie ono dostępne jednym kliknięciem w portalu oraz na liście zapisanych zapytań dodatku od wersji Personal Core w górę.

To wszystko. Twoje dane znajdują się w arkuszu i są aktualizowane jednym kliknięciem. Nic nie opuściło Twojej sieci poza wierszami, o które prosiłeś.

Dobre następne ruchy

  • Zapisz zapytanie w portalu, dzięki czemu możesz go ponownie uruchomić jednym kliknięciem z Arkuszy Google lub Excela.
  • Dodaj filtr np. zakres dat, dzięki czemu na to samo zapytanie można odpowiedzieć „w tym miesiącu” bez konieczności edycji.
  • Udostępnij wyniki z kolegą. Widzą wiersze, a nie twoje dane uwierzytelniające.

Pytania, które zadają ludzie

Czy konto Stripe musi znajdować się na komputerze, na którym korzystam z Arkuszy?

Nie. Tylko Agent musi być w tym samym miejscu, co Twoje konto Stripe. Arkusze Google działają w przeglądarce na dowolnym urządzeniu. Otwórz dodatek na tym samym koncie Google, a Twoje połączenia będą dostępne.

Czy moje dane zostaną skopiowane do strumieni zapytań?

Nie. Agent uruchamia zapytanie, w którym znajdują się Twoje dane, i wysyła tylko zwrócone wiersze. Nic nie jest synchronizowane ani przechowywane pomiędzy nimi.

Czy plan darmowy naprawdę to obejmuje?

Tak. Darmowy plan to taki, który możesz zachować, a nie okres próbny, który wygasa. Sprawdź dokładnie, co obejmuje. strona z cenami.

Czy arkusz odświeża się sam?

Kliknij ponownie „Uruchom zapytanie”, gdy chcesz uzyskać najnowsze wiersze. Aby arkusz odświeżał się zgodnie z harmonogramem, bez konieczności naciskania klawiszy, skonfiguruj automatyzację w portalu Strumienie zapytań (Strumienie → Automatyzacja). Jest ona dostępna w każdym planie.

Nadal masz problem? Otwórz Wsparcie w Query Streams i powiedz nam, na jakim etapie jesteś i co widzisz. Połączymy Cię.
Strumienie zapytań łączą również te same daneExcelClaude, Kursor i ChatGPTinterfejs API RESTi więcej
Zaktualizowano na październik 8, 2026

Powered by BetterDocs