Connecting Stripe to Sequel
This guide walks you through connecting your Stripe account to Sequel so you can ask questions like "what's our MRR by plan?" or "list refunds from last week" without writing a single SQL query or exporting a CSV.
Prerequisites
- A Stripe account — test mode or live mode both work.
- Access to the Stripe Dashboard with permission to create API keys.
- A Sequel account — sign up at sequel.sh if you don't have one yet.
Step 1: Create a Restricted Key in Stripe
Sequel uses Stripe Restricted Keys (rk_…) — narrower, read-only credentials that you can scope exactly to the resources Sequel needs. This is safer than handing over a standard Secret Key.
- Open the Stripe Dashboard.
- Go to Developers → API keys.
- Click Create restricted key.
- Give it a name like
Sequel — read only. - Set the following permissions to Read:
- Core resources: Customers, Charges, Payment Intents
- Billing: Invoices, Subscriptions, Products, Prices
- Connected: Refunds, Disputes, Payouts, Balance, Balance Transactions
- (Optional) Events, Coupons, Promotion codes
- Leave everything else as None.
- Click Create key and copy the value (it starts with
rk_test_…for test mode orrk_live_…for live).
Tip: Create two separate Restricted Keys — one for test and one for live — and add them as two separate connections in Sequel. The connection name keeps them clearly distinct.
Step 2: Add the Stripe Connection in Sequel
- In Sequel, go to Data Sources and click New Connection.
- Select Stripe from the list of connectors.
- Give the connection a name (e.g. Stripe — production or Stripe — test).
- Paste your Restricted Key into the API key field.
- Click Test connection — Sequel will hit the Stripe API and confirm the key works.
- Click Save.
That's it. Sequel will pick up your account name and currency automatically and show them on the connection.
Step 3: Ask Your First Question
Open the workbench and try one of these:
- "What's our MRR for the last 3 months, by plan?"
- "Show me the top 10 customers by total revenue."
- "How many customers churned in May?"
- "What were our Stripe fees in Q1, broken down by month?"
- "List failed payment intents in the last 7 days with their failure reason."
- "What's our current available balance in USD and EUR?"
Sequel picks the right Stripe tool, runs the query, and returns the results as a table or chart. You can follow up with refinements like "now group by plan" or "compare against April".
What Sequel Can Read From Stripe
The Stripe connector exposes these tools to the AI:
| Tool | What it does |
|---|---|
list_customers | List customers, filter by email or creation date |
list_charges | List individual charges, filter by customer or date |
list_payment_intents | List Payment Intents, filter by customer, status, or date |
list_invoices | List invoices, filter by customer, subscription, status, or date |
list_subscriptions | List subscriptions, filter by customer, status, or price |
list_products | List your product catalog |
list_prices | List prices, filter by product, type, or currency |
list_refunds | List refunds, filter by charge or date range |
list_disputes | List disputes (chargebacks), filter by date or status |
list_payouts | List payouts to your bank, filter by status or arrival date |
list_balance_transactions | The full balance ledger — charges, fees, refunds, payouts, adjustments |
get_balance | Current available and pending balance per currency |
search | Stripe Search Query Language across customers, charges, invoices, subscriptions, products, prices, and payment intents |
All tools are read-only. Sequel never creates, updates, or deletes anything in Stripe.
Test Mode vs Live Mode
Restricted Keys are mode-scoped: a key starting with rk_test_ only sees test-mode data, and rk_live_ only sees live data. You can connect both as separate Sequel sources and switch between them per query.
Updating or Revoking the Key
To rotate or revoke the key:
- In the Stripe Dashboard, go to Developers → API keys, find the key, and click Roll or Delete.
- In Sequel, open the connection's settings and paste the new key. Test, save, and you're done.
Revoking a Restricted Key in Stripe instantly cuts off Sequel's access — no further action needed on the Sequel side.
Security Notes
- Sequel encrypts your Restricted Key at rest with AES-256-GCM.
- Sequel queries the Stripe API only at the moment you ask a question — your data is never stored on Sequel's servers.
- Pair the connector with a read-only Restricted Key for defense in depth.
Troubleshooting
"Connected, but account info not available" — Your Restricted Key doesn't include the Account read permission. That's fine for most queries; only the resolveName step is affected. Add Account → Read to the key if you want Sequel to display your business name on the connection.
"Invalid API Key provided" — Double-check you copied the full key (starts with rk_… or sk_…) and that you're not mixing test and live keys.
"Permission denied on resource X" — The Restricted Key is missing the Read permission for that resource. Open the key in Stripe and add it.
Going Further
- Combine Stripe with other Sequel sources — for example, join your Stripe MRR with signups from your Postgres database in a single question.
- Use the Sequel MCP server to ask the same questions from Claude, Cursor, ChatGPT, or any MCP-compatible AI tool.
If you need a hand, reach out via support.