The one mechanic to design around
A card subscription works because the processor holds a token it can charge unattended. Crypto has no equivalent — you cannot reach into a self-custodied wallet on renewal day and pull funds. So a crypto subscription is a schedule that mints an invoice each cycle and prompts the customer to pay it. Everything automatable is automated: the plan, the per-cycle invoice, the reminders, the dunning ladder, the cancellation. The one step that stays customer-initiated is the payment itself. Any product that hides this from you is setting you up for surprise churn.
For SaaS that means your job is to (1) make each renewal invoice trivial to pay and (2) upgrade or suspend the right tenant account the moment the payment state changes. OrbChain gives you a webhook built for exactly the second half.
The billing loop, end to end
- You define a plan — a label, a price in fiat (e.g. $29), a billing interval (
interval_sec— monthly, yearly, whatever), and the coins you accept. Price in fiat and accept a stablecoin so $29 stays $29 every cycle with no rate anxiety. - You create a subscription for a customer via
POST /v1/subscription(authenticated with yourmerchant_api_key). You pass your owncustomer_ref— the tenant/account id in your system — and the call mints the first invoice inline and hands back apay_urlyou can redirect the user straight to. - They pay the invoice → the period settles and a
subscription.paidwebhook fires in real time, carrying yourcustomer_ref, the plan, and the newcurrent_period_end. That's your signal to provision or renew the account. - Each cycle, a fresh invoice is minted automatically on schedule and a
subscription.invoicedwebhook fires with apay_url— forward it as your own branded renewal email, or let OrbChain send the hosted one. - If they don't pay, dunning kicks in — a retry invoice with a fresh grace window. After two consecutive missed cycles the subscription flips to
FAILEDand asubscription.failedwebhook fires. That's your signal to downgrade or suspend.
Creating a subscription from your app
The whole point of the API is that your signup flow owns the moment. A user picks a plan in your product, your backend creates the subscription with the tenant reference already attached, and you send them to pay:
curl -X POST https://orbchain.io/v1/subscription \
-H "merchant_api_key: $ORBCHAIN_KEY" \
-H "content-type: application/json" \
-d '{
"plan_id": "plan_pro_monthly",
"customer_ref": "tenant_8842",
"customer_email": "[email protected]"
}'
# → {
# "subscription_id": "sub_...",
# "status": "ACTIVE",
# "customer_ref": "tenant_8842",
# "pay_url": "https://.../pay/<track_id>", // redirect the user here now
# "manage_url": "https://.../subscribe/manage/<token>",
# "first_invoice_track_id": "<track_id>"
# }
customer_ref is the load-bearing field. It's free text — put whatever id your system routes on — and OrbChain echoes it back on every subscription.paid event so a payment maps straight to a tenant. manage_url is the customer's private, self-service page to pause or cancel, which keeps those requests out of your support inbox. No email is required — API-only subscribers can have none on file — but supplying one lets OrbChain send hosted invoice reminders.
Trials, without a stored card
Card trials work by holding a card and charging it when the trial ends. With no stored instrument, a crypto trial is simpler and more honest: pass a future start_at and the subscription is created now but the first invoice isn't minted until that date. The customer gets full access during the trial and their first bill appears exactly when the trial expires — no silent charge, no "we kept your card" surprise. If the trial should require no commitment at all, provision the account on your side and only create the subscription when the trial ends. Either way, nobody is billed for time you promised free.
Dunning that actually works
Because payment is customer-initiated, a missed renewal is normal, not a fraud signal — someone forgot, or their reminder landed at a bad time. OrbChain's dunning is built for recovery, not punishment. When a cycle's invoice expires unpaid, the biller counts a strike and mints a fresh retry invoice with a new grace window (roughly two days on the first retry, three on the last). Only after two consecutive missed cycles does the subscription move to FAILED and fire subscription.failed. That gives a real customer several days and multiple prompts to act before you cut access.
The reminder is the product here. Each retry emits a subscription.invoiced webhook with a live pay_url — most SaaS teams forward that into their own dunning emails so the message matches their voice and links straight to a payable invoice. When the customer finally pays, subscription.paid fires, the grace counter resets, and the cycle advances as if nothing happened. Don't suspend on the first miss; suspend on subscription.failed.
Wire the two webhooks that matter
Your entire SaaS entitlement logic hangs off two events. subscription.paid means "this tenant is paid through current_period_end — provision or extend them." subscription.failed means "dunning is exhausted — downgrade or suspend them." Because subscription.paid carries customer_ref, plan_id, plan_label, amount_usd, and the billing period, you never need a local map from invoice to tenant or any order_id string-parsing:
// POST /webhooks/orbchain (verify the HMAC signature first)
switch (event.type) {
case "subscription.paid":
await entitlements.activate(event.customer_ref, {
plan: event.plan_id,
until: event.current_period_end, // unix seconds
});
break;
case "subscription.failed":
await entitlements.suspend(event.customer_ref);
break;
}
Every OrbChain webhook is HMAC-signed and carries a deterministic event_id you can dedupe on, so retries are safe to replay. See reliable payment webhooks for verifying signatures and building an idempotent receiver — do that once and every subscription event flows through the same handler.
Reconciliation and lifecycle
You'll rarely need to poll, but the read side is there when you do. GET /v1/subscription lists your subscriptions (filterable by status or by your own customer_ref), and POST /v1/subscription/:id/cancel ends one from your app — for example when a tenant deletes their account. Cancellation rotates the customer's management token so any stale link dies with it. Between the webhooks (real-time) and the list endpoint (for a nightly reconcile), your billing state and OrbChain's stay in lockstep.
Keep the money boring
Two settings make crypto SaaS revenue behave like a bank balance. Price plans in fiat and accept a stablecoin so every renewal is the exact dollar figure you quoted. And turn on Auto Settle so if a customer does pay in a volatile coin, it converts to your settlement stablecoin at payment time — you get predictable MRR without holding an asset that might be down 8% by the time you'd recognize it. More on the coin side in accept any coin, settle in USDT.
Where crypto SaaS billing fits
It's a strong fit when your users already hold crypto (they'll happily pay a link), when you sell annual or seat-based plans where renewals are infrequent, or when you serve customers a card processor won't touch. It's a weaker standalone fit for high-volume consumer monthly billing where set-and-forget auto-charge is the expectation — there, the honest move is to accept crypto alongside cards and let each customer pick their rail. Crypto billing doesn't have to replace your card stack to earn its place; it has to capture the customers your card stack is losing. For the mechanics behind the surface, see how crypto subscriptions & recurring billing work.