commercepackages/commerce/billing
billing package
Multi-provider billing — Stripe, Polar, LemonSqueezy, ChinaPay, manual. Same Subscription / Invoice / Customer surface for every backend.
- Stability
- Stable
- Scope
- Tenant-scoped
- Boundary
- packages/commerce/billing
Subscriptions · billing
live
MRR
$12,400
+12%
Active subscribers
847
+34
MoM growth
+5.2%
vs last
Churn
1.2%
-0.3%
Revenue · last 7 days
- Mon42%
- Tue58%
- Wed51%
- Thu67%
- Fri73%
- Sat80%
- Sun92%
$12,400 this month
Usagebilling.ts
typescriptbilling.ts
1import { createCheckoutSession, getSubscription } from "@nebutra/billing";
2
3// Auto-routes to Stripe / Polar / LemonSqueezy / ChinaPay.
4const session = await createCheckoutSession({
5 customerId: org.id,
6 priceId: "price_pro_monthly",
7 successUrl: `${origin}/billing/success`,
8});
9
10const sub = await getSubscription(org.id);
11if (sub.plan === "pro" && sub.status === "active") {
12 // unlock pro features
13}