Skip to content

Stripe

PerSQL keeps a queryable mirror of your Stripe account. Customers, subscriptions, invoices, and charges stream into SQL tables you can query and join — the cohort and revenue reports Stripe’s dashboard can’t express, without writing any webhook plumbing.

  1. Go to stripe.persql.com/install/start and authorize via Stripe Connect — read-only, scoped to your account.

  2. PerSQL provisions a database in your workspace and begins mirroring. New events keep the tables current via webhook.

import { PerSQL } from "@persql/sdk";
const db = new PerSQL({ token: process.env.PERSQL_TOKEN })
.database(process.env.PERSQL_DATABASE);
const { data } = await db.query(`
SELECT count(*) AS active
FROM subscriptions
WHERE status = 'active'
`);

Point an agent at the Stripe MCP for mirror status:

https://stripe.persql.com/mcp

Authenticate with a PerSQL bearer token. stripe_mirror_status reports row counts and last-mirrored timestamps; stripe_install_list shows connected accounts.