sub3 example

Sign in with your wallet to see your plan, allowance and credits.

Plan, cycle and lifetime come from sub3 (GET /v1/access, in sub3.mjs). Allowance and credits are this app's own ledger (ledger.mjs); how much each tier gets is your rule in config.mjs.

Plans and packs

Paid on sub3's hosted checkout. A year costs 10 months. A higher tier starts at once; switching down waits until your current tier ends.

Items come from sub3 (GET /v1/products). Each button opens sub3's hosted /checkout; the payment goes straight to the merchant on chain, and sub3 enforces renewals and upgrades.

Try it

Each run costs 1: this cycle's allowance first, then purchased credits.

Your paid feature. Your backend checks access (config.mjs rules on /v1/access) and charges your ledger once per Idempotency-Key; a failed action is refunded. sub3 is not called here.

Developer view: what just happened

    sub3's answer for your wallet, GET /v1/access: