Example code for the FlowCheck API — one API for Stripe payouts and bank data.
FlowCheck connects your Stripe payouts and bank accounts (via Plaid) into a single, clean API. Check balances, track payouts, reconcile transactions, and catch discrepancies. Setup takes 20 minutes.
# Register (no auth required)
curl -X POST https://developer.usepopup.com/api/v0/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "dev@example.com"}'
# Complete checkout, then check status
curl "https://developer.usepopup.com/api/v0/auth/register/status?token=YOUR_TOKEN"
# → { "data": { "status": "active", "api_key": "fc_test_..." } }curl https://developer.usepopup.com/api/v0/balance \
-H "Authorization: Bearer fc_test_your_key_here"{
"data": {
"stripe": { "available": 142350, "pending": 28900, "currency": "usd" },
"bank": { "available": 138200, "current": 145000, "currency": "usd" }
}
}All amounts are in cents.
npm install @flowcheck/sdkimport { FlowCheck } from "@flowcheck/sdk";
const fc = new FlowCheck("fc_live_your_key_here");
// Check balances
const { data: balance } = await fc.balance();
console.log(`Stripe: $${balance.stripe.available / 100}`);
console.log(`Bank: $${balance.bank.available / 100}`);
// List recent payouts
const { data: payouts } = await fc.payouts({ status: "paid", limit: 10 });
for (const p of payouts) {
console.log(`${p.id}: $${p.amount / 100} — ${p.reconciliation.status}`);
}
// Reconciliation health
const { data: summary } = await fc.reconciliationSummary();
console.log(`Health score: ${summary.health_score}/100`);
console.log(`Matched: ${summary.matched}/${summary.total_payouts}`);
// Check for problems
const { data: discrepancies } = await fc.discrepancies({ status: "open" });
for (const d of discrepancies) {
console.log(`${d.type}: ${d.description}`);
}FlowCheck has an MCP server that gives Claude Code direct access to your financial data.
claude mcp add --transport stdio \
--env FLOWCHECK_API_KEY=fc_live_your_key \
flowcheck -- npx -y @flowcheck/mcp-serverOr add to your project's .mcp.json:
{
"mcpServers": {
"flowcheck": {
"command": "npx",
"args": ["-y", "@flowcheck/mcp-server"],
"env": {
"FLOWCHECK_API_KEY": "${FLOWCHECK_API_KEY}"
}
}
}
}- "What's my current balance across Stripe and my bank?"
- "Show me unmatched payouts from the last 30 days"
- "Are there any discrepancies I should look at?"
- "Give me a financial position summary"
- "Set up a webhook for payout discrepancy events"
Claude Code calls the FlowCheck tools directly — no code to write.
| Example | Description |
|---|---|
examples/balance.ts |
Check Stripe + bank balances |
examples/reconciliation.ts |
Monitor reconciliation health and investigate mismatches |
examples/webhooks.ts |
Register a webhook and verify signatures |
examples/cashflow.ts |
Daily cash flow breakdown |
examples/agent.ts |
AI agent financial summary |
- Full docs (plain text): developer.usepopup.com/llms-full.txt
- OpenAPI spec: developer.usepopup.com/.well-known/openapi.json
- AI discovery: developer.usepopup.com/llms.txt
| Endpoint | Description |
|---|---|
GET /v0/balance |
Stripe + bank balances in one call |
GET /v0/cashflow |
Daily inflow/outflow (7d, 30d, 90d) |
GET /v0/payouts |
List payouts with reconciliation status |
GET /v0/payouts/:id |
Single payout with match details |
GET /v0/transactions |
Bank transactions from Plaid |
GET /v0/discrepancies |
Missing deposits, amount mismatches |
GET /v0/reconcile/summary |
30-day reconciliation health score |
GET /v0/reconcile/:payout_id |
Per-payout reconciliation detail |
GET /v0/agent/position |
Financial summary for AI agents |
GET /v0/agent/alerts |
Active alerts for AI agents |
POST /v0/connect/stripe |
Connect Stripe account |
POST /v0/connect/plaid/link-token |
Start Plaid bank connection |
POST /v0/connect/plaid/exchange |
Complete Plaid connection |
GET /v0/webhooks |
List webhook endpoints |
POST /v0/webhooks |
Register webhook (HMAC-signed) |
DELETE /v0/webhooks/:id |
Remove webhook |
| Plan | Price | Credits/mo | Rate Limit |
|---|---|---|---|
| Trial | Free (7 days) | 100 | 60/min |
| Starter | $4.99/mo | 1,000 | 300/min |
| Growth | $19/mo | 5,000 | 600/min |
| Pro | $49/mo | 15,000 | 600/min |
| Scale | Custom | Custom | 6,000/min |
1 credit = 1 API request. Webhook deliveries are free. Sandbox is always free.