Subscription plans, billing ticks, dunning, reconciliation — without ever storing a card number. Each billing period issues a fresh invoice; the customer pays in any of your accepted coins; failed periods run the dunning ladder. Signed receipts on every invoice.
day · week · month · year. Interval count multiplies.REQstart + trial_days.OPTSubscription row links plan + customer + status + next_invoice_at.ACTIVEnext_invoice_at ≤ now. Creates a fresh payment invoice per match.INVOICEDnext_invoice_at advances by interval.PAIDsubscription.invoiced, subscription.paid, subscription.failed, subscription.canceled.SIGNED// 1. Create a plan — $10/month, pay any of 3 coins, no trial. curl https://orbchain.io/v1/subscription/plan \ -H "merchant_api_key: mk_live_…" \ -d '{ "name": "Pro monthly", "amount": 10, "currency": "USD", "interval": "month", "accepted_coins": ["BTC_LN", "USDT_TRC20", "USDC_ERC20"] }' // → { "plan_id": "plan_01JR5P…", ... } // 2. Subscribe a customer. curl https://orbchain.io/v1/subscription \ -H "merchant_api_key: mk_live_…" \ -d '{ "plan_id": "plan_01JR5P…", "external_user_id": "user_12345", "customer_email": "[email protected]" }' // → { "subscription_id": "sub_01JR5P…", "next_invoice_at": "2026-05-20T…" }
trial_days on the plan or per-subscription override. First invoice fires at trial end.LIVEPATCH /v1/subscription/:id { "status": "paused" }. Tick skips paused rows; next_invoice_at shifts on resume.LIVEEach period the tick creates a new invoice with a hosted payment URL. You email (or notify in-app) the customer the URL; they pay. Alternatively, auto-debit isn't a thing in crypto without the customer pre-authorizing a smart-contract allowance — which we don't implement because it breaks the self-custodial model. The manual-pay flow is the tradeoff for no-card.
Plans are USD-priced; the crypto equivalent is pinned at invoice-creation time. The customer has the invoice expiry (default 1h) to pay — if BTC moves 10% during that hour, the price they see is what we asked for.
Same ladder, different failure mode. A card failure is "declined"; a crypto failure is "customer didn't pay within the invoice window". Retry = new invoice with new window. After the last rung, subscription cancels and fires subscription.canceled.
Yes — GET /v1/subscription/:id/invoices returns every invoice issued for the subscription, with status, amount, paid_at, and a link to the signed receipt.
DELETE /v1/subscription/:id — cancels at current period end by default (pass ?immediate=true for instant). Fires subscription.canceled.
Plans, dunning, proration, signed receipts. 0.4% per settled invoice — no subscription platform fee on top.