Sign In

@flowcheck/sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowcheck/sdk

TypeScript SDK for the FlowCheck API — Stripe payouts, Shopify orders, and bank data in one API

latest
Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
16
Maintainers
1
Weekly downloads
 
Created
Source

@flowcheck/sdk

TypeScript SDK for the FlowCheck API — unified access to Stripe payouts, Shopify orders, and bank transaction data.

Install

npm install @flowcheck/sdk

Quick start

import { FlowCheck } from "@flowcheck/sdk";

const fc = new FlowCheck("fc_live_...");

// Get cash flow for the last 30 days
const { data } = await fc.cashflow("30d");
console.log(`Net: $${data.net / 100}`);

// List Shopify payouts only
const shopify = await fc.payouts({ source: "shopify" });
console.log(`${shopify.data.length} Shopify payouts`);

// Check for unmatched payouts
const summary = await fc.reconciliationSummary();
console.log(summary.data.summary);

curl equivalent

curl https://developer.usepopup.com/api/v0/cashflow?window=30d \
  -H "Authorization: Bearer fc_live_..."

Example response

{
  "data": {
    "window": "30d",
    "total_inflow": 523400,
    "total_outflow": 187600,
    "net": 335800,
    "daily": [
      { "date": "2026-03-05", "inflow": 18200, "outflow": 4300, "net": 13900 },
      { "date": "2026-03-04", "inflow": 22100, "outflow": 6800, "net": 15300 }
    ]
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-03-05T10:00:00Z",
    "version": "v0"
  },
  "errors": []
}

All amounts are in cents (USD).

Methods

Auth

MethodHTTPDescription
register(email)POST /auth/registerCreate account (no key needed)
registrationStatus(token)GET /auth/register/statusCheck registration / get API key

Financial Data

MethodHTTPDescription
balance()GET /balanceStripe + bank balances
cashflow(window?)GET /cashflowRevenue, expenses, net by day
payouts(params?)GET /payoutsStripe + Shopify payouts with match status
payout(id)GET /payouts/:idSingle payout with bank match
transactions(params?)GET /transactionsBank transactions from Plaid
discrepancies(params?)GET /discrepanciesMissing or mismatched amounts
reconciliationSummary()GET /reconcile/summary30-day reconciliation summary
reconciliation(payoutId)GET /reconcile/:idPer-payout reconciliation detail

Agent

MethodHTTPDescription
agentPosition()GET /agent/positionFull financial snapshot for AI agents
agentAlerts()GET /agent/alertsActive issues for AI agents

Integrations

MethodHTTPDescription
connectStripe(restrictedKey)POST /connect/stripeConnect Stripe account
connectShopify(shop, accessToken)POST /connect/shopifyConnect Shopify store
createPlaidLinkToken()POST /connect/plaid/link-tokenStart Plaid bank connection
exchangePlaidToken(publicToken)POST /connect/plaid/exchangeComplete Plaid connection

Webhooks

MethodHTTPDescription
webhooks()GET /webhooksList webhook endpoints
createWebhook(url, events)POST /webhooksRegister webhook endpoint
deleteWebhook(id)DELETE /webhooks/:idRemove webhook endpoint

Billing

MethodHTTPDescription
upgradePlan(plan)POST /billing/upgradeGet checkout URL to upgrade (works at 0 credits)
topUp()POST /billing/topupBuy 100 credits for $5

Filtering payouts by source

// All payouts
const all = await fc.payouts();

// Stripe only
const stripe = await fc.payouts({ source: "stripe" });

// Shopify only
const shopify = await fc.payouts({ source: "shopify" });

Pagination

List endpoints (payouts, transactions, discrepancies) support cursor-based pagination:

const first = await fc.payouts({ limit: 10 });
console.log(first.data); // first 10 payouts

if (first.meta.has_more) {
  const next = await fc.payouts({ limit: 10, cursor: first.meta.cursor });
  console.log(next.data); // next 10 payouts
}

Error handling

The SDK throws on non-2xx responses. The error includes status and body:

try {
  await fc.balance();
} catch (err) {
  if (err.status === 401) {
    console.log("Invalid API key");
  }
  if (err.status === 402) {
    console.log("Out of credits — upgrade or top up");
    // Programmatic upgrade:
    const { data } = await fc.upgradePlan("starter");
    console.log(`Upgrade at: ${data.checkout_url}`);
  }
  console.log(err.body); // full error response
}

Get an API key

Sign up at developer.usepopup.com to get your API key. 7-day free trial with 100 credits included.

License

MIT

Keywords

flowcheck

FAQs

Package last updated on 07 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts