BuffMoneyBuffMoney

One system. Usage to settlement.

BuffMoney isn't a billing tool you bolt onto a payment processor. It's one revenue chain — from the first metered API call to a wire transfer in your bank — built for AI products selling into China.

Three billing models built in.

Whatever shape your AI product uses to monetize — fixed subscription, prepaid credits, or one-time purchase — BuffMoney handles the metering, CNY collection, and settlement end to end.

Subscription

Fixed monthly access fee

Users pay a recurring monthly fee for continued access. You set the tiers — Standard, Pro, Teams. Each cycle BuffMoney generates a CNY invoice, collects via WeChat Pay / Alipay, and settles the net to you.

  • Multiple tiers in one product
  • Upgrade / downgrade handled mid-cycle
  • PDF invoice auto-generated and emailed
  • Cancel anytime, access held through period end
Like Stripe Billing recurring subscriptions or Cursor Pro ($20/mo)¥149 / mo Standard · ¥299 / mo Pro

Prepaid top-up

Buy credits, spend as you go

Users buy a credit balance upfront; each action deducts from it. The default model for AI consumer products in China — no billing surprises, high conversion. Users top up when they want.

  • Multiple top-up tiers (¥30 / ¥100 / ¥300 / ¥1,000)
  • Bonus promotions (¥100 buy = ¥20 extra)
  • Atomic deduction per usage event — no double-spend
  • Balance + history exposed via API
Like OpenAI prepaid credits — buy $10, spend across the month¥100 = 500 image generations · ¥300 = 1,800

One-time purchase

Pay once, own forever

Users pay a single amount for a permanent entitlement — lifetime license, digital asset pack, model fine-tune, premium feature unlock. A signed webhook delivers access; you control the gate.

  • Single invoice, PDF auto-generated and emailed
  • Entitlement delivery via webhook
  • Configurable refund window
  • No recurring overhead
Like Lemon Squeezy or Paddle one-time products, but collecting CNY for China¥99 lifetime access · ¥299 premium model pack

Six modules, one ledger.

Every module writes to the same append-only ledger. Reconciliation isn't a separate process — it's the byproduct of the design.

Usage metering

POST one event per metered action — token, image, agent run, storage GB. Idempotent ingestion, batch up to 500 per call, deduped by your own key.

  • 5 built-in AI metrics
  • Custom dimensions: model, region, tier
  • TypeScript SDK + REST

Pricing & rate cards

Version-controlled rate cards per product. Pay-as-you-go, free allowances, tiered pricing, prepaid balance — without forking your billing logic.

  • Immutable versions, never overwritten
  • Multi-currency rate cards
  • Change tracking in audit log

CNY collection

Your end-customer scans WeChat Pay or Alipay. We collect under ePayments' license, return signed callbacks, and never expose payment credentials to your servers.

  • WeChat Pay native / JSAPI / H5
  • Alipay PC web + mobile
  • Hosted checkout URL per invoice

FX & settlement

Each invoice locks one FX snapshot (BOC midpoint + transparent spread). Multi-currency balances — USD, EUR, GBP, SGD, AUD, NZD, HKD, JPY, THB.

  • Per-invoice FX locked
  • 9 settlement currencies
  • Net-of-fee balance derived from ledger

Settlement batches

Periodic payouts per merchant per currency. Two-admin approval required by policy. Export to CSV for ops.

  • Two-admin approval
  • CSV export per batch
  • Free above USD 5,000 / batch

Reconciliation & risk

Daily channel statements matched against internal payment orders and ledger entries. Velocity rules + manual freeze for risk events.

  • only_channel / only_internal / mismatch diffs
  • Per-merchant daily CNY limit
  • Manual freeze + audit

Built for developers, not finance committees.

Every primitive a billing system needs — designed so a single engineer can integrate in a day.

OpenAPI 3.1 spec

Single source of truth at /api/openapi. Generate clients for any language.

TypeScript SDK

Zero-dependency client at @buffmoney/sdk. Works in Node, Deno, Cloudflare Workers.

Webhook delivery

HMAC-signed events with exponential retry and replay UI.

Sandbox keys

Test the full flow without live money. Sandbox / live separated at the API-key layer.

Idempotency built in

Per-event + per-request idempotency. Retries are safe by design.

Append-only ledger

Every cent traceable. Balances derived from ledger, never patched in place.

Start with three lines

From npm install to your first event:

npm install @buffmoney/sdk

import BuffMoneyClient from "@buffmoney/sdk";
const client = new BuffMoneyClient({ apiKey: process.env.BUFFMONEY_API_KEY! });

await client.usageEvents.ingest([{
  customerExternalId: "user_42",
  idempotencyKey: `evt_${Date.now()}`,
  metric: "tokens_output",
  quantity: "12500",
  occurredAt: new Date().toISOString()
}]);