Subscription payments
Plan subscription-like payments only where recurring behavior is approved.
Subscription payments with 0Base should be modeled as billing-cycle payment objects, not as invisible card-style automatic pulls unless that behavior is explicitly enabled. Each cycle needs its own amount, due date, payment object, status history, retry policy, and reconciliation record.
0Base availability is account-gated. Build against capabilities, merchant status, environment mode, and settlement settings instead of assuming that every payment method, asset, network, cadence, or refund path is enabled for every merchant.
0Base product docs and API details
These pages are public product guidance for merchant and platform developers. 0Base endpoint-level API pages are not published for partners yet; use this product documentation to understand the workflow, records, and launch boundaries.
End-to-end picture
This flow is intentionally shown as product infrastructure: Billing cycle -> Create payment object -> Notify customer -> Customer pays -> Status updates subscription -> Ledger/report. The merchant application can make the customer experience simple, but the backend should keep each step visible enough for retries, support, and finance closeout.
Production contract
| Boundary | What to build | Why it matters |
|---|---|---|
| Cycle record | Create a billing-cycle row before creating 0Base payment object. | Subscriptions need period-level evidence. |
| Payment object per cycle | Use checkout/link/intent per billing event. | Prevents one old link from representing many obligations without tracking. |
| Retry policy | Define reminders, expiry, grace period, suspension, and reactivation. | Customers need predictable outcomes. |
| State separation | Subscription active/past_due/cancelled is not identical to payment intent status. | Avoids accidental access changes. |
| Reconciliation | Join cycle id, intent id, event id, and ledger id. | Finance can close recurring revenue. |
Status and state handling
| State | What it means | Developer action |
|---|---|---|
| Cycle open | Billing cycle requires collection. | Show payment route. |
| Payment pending | Customer payment is in progress. | Keep subscription policy in grace/pending. |
| Paid | Cycle is paid according to terminal status and policy. | Continue service. |
| Past due/cancelled | Collection failed or expired. | Apply merchant policy. |
Status handling should be strict even when the customer UI is friendly. Store raw 0Base statuses, map them to customer-safe labels at the edge, and keep the merchant order state separate from the payment object state. That separation lets you change customer copy without corrupting reconciliation.
Example implementation record
This is an application-side record shape for subscription payments. Keep exact request and response fields aligned with your enabled account contract when 0Base API access is released for your partner account; the point of this record is to keep product, support, and finance joined in your system.
{
"subscription_id": "sub_7781",
"billing_cycle": "2026-06",
"cycle_amount": "29.00",
"currency": "EUR",
"payment_intent_id": "pi_live_456",
"payment_status": "requires_payment",
"subscription_state": "grace_period"
}Operational scenario
A SaaS merchant can use 0Base for subscription cycles by creating a new payable object each period. That makes recurring crypto payments auditable without pretending the system can silently debit a customer wallet.
In practice, production 0Base integrations make the happy path fast while keeping exceptions predictable: retries return the same object, delayed notifications can be repaired, expired sessions do not become mystery payments, and finance exports can be traced back to the original merchant order.
Before and after
| Before 0Base | With 0Base |
|---|---|
| One reusable link represented all cycles. | Each cycle has its own record and payment object. |
| Payment status directly changed subscription status. | Subscription policy maps payment outcomes to access state. |
| Grace periods were tracked manually. | Cycle record stores expiry and retry schedule. |
| Finance could not close MRR by period. | Reports group by cycle and intent id. |
Evidence to keep
| Evidence | What to store |
|---|---|
| Cycle record | Subscription id, cycle period, due date, amount, currency. |
| Payment record | Intent/link/checkout id, status, expiry, idempotency key. |
| Access record | Grace period, suspension date, reactivation trigger. |
| Event record | Payment events and delivery attempts. |
| Revenue record | Ledger id, report period, recognized revenue policy reference. |
This evidence is what makes the integration supportable at institutional scale. A developer should not need private operational knowledge to answer basic questions such as what the customer saw, which object owns the state, which event announced the change, and which ledger or report row closed the money movement.
Failure modes and recovery
| Failure mode | Recovery |
|---|---|
| Customer pays old cycle link | Apply to the correct cycle or route to support; do not overwrite current cycle. |
| Payment expires during grace period | Issue fresh payment object and update retry count. |
| Webhook marks paid after suspension | Read current status and reactivate according to policy. |
| Cycle amount changes | Create new object for new cycle terms. |
Recovery should be idempotent and explainable. When the system is uncertain, preserve the current raw status, read the latest object state, attach a support reference, and avoid changing fulfillment or finance state until a trusted terminal condition is present.
API adjacency
| API area | Use it for |
|---|---|
POST /payment_links | Create reusable or cycle payment link where appropriate. |
POST /payment_intents | Create cycle payment intent. |
GET /payment_intents/{intentId} | Read cycle payment state. |
GET /reports/transactions | Reconcile billing periods. |
For endpoint-level implementation, use the API reference as the source of truth for fields, enums, authentication, idempotency behavior, pagination, and response examples.
Why this matters for merchants and customers
Subscription commerce needs repeatable payment cycles, not invisible assumptions. 0Base can model each payable cycle as its own object so billing, access, recovery, and revenue reporting stay aligned.
At scale, the value of 0Base is not only that a payment can be created. The value is that the payment can be explained later: what the customer saw, which account capabilities allowed it, which backend state changed, which notification delivered it, and which ledger or report row closed it.
Worked API path
The example below shows the implementation shape for this page. Use merchant-specific capabilities, account settings, and API responses in production; the ids and values here are illustrative.
curl -X POST https://base-api-sandbox.0bit.app/v1/payment_intents \
-H "Authorization: Bearer $OBIT_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ord_100045:base:v1" \
-d '
{
"amount": "89.00",
"currency": "EUR",
"cryptoCurrency": "USDT",
"clientReference": "ord_100045",
"settlementCurrency": "USDC",
"settlementRail": "onchain"
}'Example response shape:
{
"intentId": "pi_test_456",
"status": "requires_payment",
"amount": "89.00",
"currency": "EUR",
"cryptoCurrency": "USDT",
"clientReference": "ord_100045",
"settlementCurrency": "USDC",
"settlementRail": "onchain"
}Implementation checkpoints:
- Store your merchant reference before calling 0Base.
- Attach the returned object id to the same business record.
- Record the request id, idempotency key, raw status, and environment.
- Use webhook and report reads to repair delayed or missed state changes.
Data join map
This join map is the reason 0Base is infrastructure rather than a payment button. A merchant can change checkout UX, support tooling, or finance exports without losing the chain from customer action to backend state and settlement evidence.
Operator runbook
| Signal | Check first | Action |
|---|---|---|
| Customer reports payment not updating | Look up merchant order id, 0Base object id, raw status, and latest webhook delivery. | Read current object state before changing fulfillment. |
| Webhook delivery failed | Check delivery id, event id, attempts, last error, and handler logs. | Fix the handler, replay once, and dedupe by event id. |
| Finance cannot match a row | Compare client reference, intent id, settlement id, report period, and export row. | Move the item to reconciliation queue instead of closing by amount/date. |
The runbook should be available to support and finance teams before launch. A developer integration is not complete if only engineering can explain the state of a customer payment.
Developer checklist
- Create a billing-cycle row first.
- Use one payment object per payable cycle.
- Separate subscription status from payment status.
- Define retry and grace-period rules.
- Record all cycle-to-payment joins.
- Test late payment after suspension.