Connectors

Stripe

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.

  1. Open the Stripe Dashboard.
  2. Go to Developers → API keys.
  3. Click Create restricted key.
  4. Give it a name like Sequel — read only.
  5. 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
  6. Leave everything else as None.
  7. Click Create key and copy the value (it starts with rk_test_… for test mode or rk_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

  1. In Sequel, go to Data Sources and click New Connection.
  2. Select Stripe from the list of connectors.
  3. Give the connection a name (e.g. Stripe — production or Stripe — test).
  4. Paste your Restricted Key into the API key field.
  5. Click Test connection — Sequel will hit the Stripe API and confirm the key works.
  6. 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:

ToolWhat it does
list_customersList customers, filter by email or creation date
list_chargesList individual charges, filter by customer or date
list_payment_intentsList Payment Intents, filter by customer, status, or date
list_invoicesList invoices, filter by customer, subscription, status, or date
list_subscriptionsList subscriptions, filter by customer, status, or price
list_productsList your product catalog
list_pricesList prices, filter by product, type, or currency
list_refundsList refunds, filter by charge or date range
list_disputesList disputes (chargebacks), filter by date or status
list_payoutsList payouts to your bank, filter by status or arrival date
list_balance_transactionsThe full balance ledger — charges, fees, refunds, payouts, adjustments
get_balanceCurrent available and pending balance per currency
searchStripe 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:

  1. In the Stripe Dashboard, go to Developers → API keys, find the key, and click Roll or Delete.
  2. 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.