Stripe
Sync your Stripe data - customers, charges, invoices, and more.
Configuration
You need a Stripe API key with read permissions.
- Go to Stripe Dashboard > Developers > API keys
- Create a new restricted key with Read permissions
- Copy the restricted key for the mode you want to sync (test or live)
- Paste it in the rawquery connection form
Security tip: Use a restricted key with only read permissions. Never use your secret key with full access.
Synced Tables
The schema name is the connection name you choose when creating the connection. For example, if you name your connection "my_stripe":
| Table | Description |
|---|---|
| your_name.customers | Customer records |
| your_name.charges | Payment charges |
| your_name.invoices | Invoices |
| your_name.subscriptions | Active and past subscriptions |
| your_name.products | Product catalog |
| your_name.prices | Pricing information |
| your_name.payment_intents | Payment intents |
Example Queries
Paid invoices by creation month
SELECT strftime(created, '%Y-%m') AS month, COUNT(*) AS invoice_countFROM my_stripe.invoicesWHERE paid = trueGROUP BY 1ORDER BY 1SELECT strftime(created, '%Y-%m') AS month, COUNT(*) AS invoice_countFROM my_stripe.invoicesWHERE paid = trueGROUP BY 1ORDER BY 1This counts invoices marked paid, including zero-value invoices. It groups by invoice creation date and does not calculate revenue or MRR. Follow the chart walkthrough to save and share this result.
Customers with successful charges
SELECT c.id, c.email, COUNT(ch.id) AS successful_charge_countFROM my_stripe.customers cJOIN my_stripe.charges ch ON ch.customer = c.idWHERE ch.status = 'succeeded'GROUP BY c.id, c.emailORDER BY successful_charge_count DESCLIMIT 20SELECT c.id, c.email, COUNT(ch.id) AS successful_charge_countFROM my_stripe.customers cJOIN my_stripe.charges ch ON ch.customer = c.idWHERE ch.status = 'succeeded'GROUP BY c.id, c.emailORDER BY successful_charge_count DESCLIMIT 20Successful charges may later be refunded. For monetary reporting, define refund handling, reporting dates, and currency conversion before summing amounts. Stripe amounts use the currency's minor unit; not every currency uses cents.