npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flowcheck/sdk

v0.2.2

Published

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

Readme

@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

| Method | HTTP | Description | |--------|------|-------------| | register(email) | POST /auth/register | Create account (no key needed) | | registrationStatus(token) | GET /auth/register/status | Check registration / get API key |

Financial Data

| Method | HTTP | Description | |--------|------|-------------| | balance() | GET /balance | Stripe + bank balances | | cashflow(window?) | GET /cashflow | Revenue, expenses, net by day | | payouts(params?) | GET /payouts | Stripe + Shopify payouts with match status | | payout(id) | GET /payouts/:id | Single payout with bank match | | transactions(params?) | GET /transactions | Bank transactions from Plaid | | discrepancies(params?) | GET /discrepancies | Missing or mismatched amounts | | reconciliationSummary() | GET /reconcile/summary | 30-day reconciliation summary | | reconciliation(payoutId) | GET /reconcile/:id | Per-payout reconciliation detail |

Agent

| Method | HTTP | Description | |--------|------|-------------| | agentPosition() | GET /agent/position | Full financial snapshot for AI agents | | agentAlerts() | GET /agent/alerts | Active issues for AI agents |

Integrations

| Method | HTTP | Description | |--------|------|-------------| | connectStripe(restrictedKey) | POST /connect/stripe | Connect Stripe account | | connectShopify(shop, accessToken) | POST /connect/shopify | Connect Shopify store | | createPlaidLinkToken() | POST /connect/plaid/link-token | Start Plaid bank connection | | exchangePlaidToken(publicToken) | POST /connect/plaid/exchange | Complete Plaid connection |

Webhooks

| Method | HTTP | Description | |--------|------|-------------| | webhooks() | GET /webhooks | List webhook endpoints | | createWebhook(url, events) | POST /webhooks | Register webhook endpoint | | deleteWebhook(id) | DELETE /webhooks/:id | Remove webhook endpoint |

Billing

| Method | HTTP | Description | |--------|------|-------------| | upgradePlan(plan) | POST /billing/upgrade | Get checkout URL to upgrade (works at 0 credits) | | topUp() | POST /billing/topup | Buy 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.

Links

License

MIT