@fonderie/billing
v5.3.1
Published
SaaS billing in one module — config-driven plan catalogue, Stripe subscriptions, polymorphic user and workspace billing surfaces, usage metering, and webhook handling.
Maintainers
Readme
@fonderie/billing
SaaS billing as a brick: a config-driven plan catalogue, Stripe subscriptions, feature gates, and usage limits — so "can this workspace do that?" is one function call.
Install
npm install @fonderie/billingUse
import { FonderieApp, defineConfig } from '@fonderie/core';
import { BillingModule } from '@fonderie/billing';
const app = await new FonderieApp(defineConfig({}))
.register(new BillingModule())
.boot();Gate routes and features:
import { requirePlan, requireFeature, hasFeature, getPlanLimit } from '@fonderie/billing';StripeProvider handles checkout and webhook events; usage counters run
on MemoryCounterBackend or DBCounterBackend.
Why this exists
You've shipped this plumbing before — auth, teams, billing, messaging —
and the next project will ask for it again. Fonderie packages it once:
plain TypeScript modules for
@fonderie/core,
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
per-seat anything. Register the modules you need; skip the ones you don't.
This package owns what the caller pays for. Plans, subscriptions, feature gates, and usage limits — the commercial rules the other bricks consult before acting.
Browse the whole set at fonderiejs/sdk · follow @fonderiejs
License
MIT © Fonderie, Inc.
