Skip to content
全部能力
商业化packages/commerce/billing

billing 能力包

多 provider 计费 — Stripe / Polar / LemonSqueezy / ChinaPay / Manual;Subscription / Invoice / Customer 接口对所有后端保持一致。

打开文档
稳定性
稳定
作用域
按租户隔离
边界
packages/commerce/billing
订阅 · billing
已同步

MRR

$12,400

+12%

活跃订阅

847

+34

环比增长

+5.2%

对比上月

流失率

1.2%

-0.3%
下一张账单进行中

Acme Robotics, Inc.

[email protected]

Pro
$249.00 / 月
下次扣款2026 年 6 月 12 日
Stripe
收入 · 最近 7 天
  • 周一
    x
    42%
  • 周二
    x
    58%
  • 周三
    x
    51%
  • 周四
    x
    67%
  • 周五
    x
    73%
  • 周六
    x
    80%
  • 周日
    x
    92%

本月 $12,400

使用方式billing.ts
typescript
billing.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}