0Bit Documentation

OBit Architecture

How 0Bit product surfaces, partner backends, browser flows, signed events, ledgers, and Scan visibility fit together.

0Bit architecture is product-surface based. Developers integrate with the product that owns the workflow, while platform conventions stay consistent: organization accounts, pk_*/sk_* credentials, test/live modes, idempotent writes, signed webhooks, and reconciliation records.

Architecture at a glance

Planes

PlaneOwnsSecurity boundary
Partner backendYour order/account/invoice/workflow records, secret-key calls, idempotency, webhook verification, fulfillment, reconciliation.Holds sk_*, whsec_*, private references, user ids, and server logs.
Partner browser/mobileHosted/embedded UX, redirect handling, pending screens, user-visible progress.Receives only browser-safe values approved by the product.
0Bit identity and entitlementsOrganization, users, keys, enabled products, product-specific access checks.A key can be valid but still not entitled for a product.
Product APIs0Gate sessions, 0Pools quotes/trades, 0Base payment objects, 0Link route/workflow records.Versioned product contracts; availability depends on setup and environment.
Event deliverySigned asynchronous product events.Verify raw body, timestamp, and signature before applying state.
Scan/reports/ledgersVisibility, support, finance, reconciliation.Operational context, not a substitute for webhook verification.

Product boundaries

ProductInputsOutputs
0GateAmount, currency, return URL, optional flow constraints, browser-safe embed values.Session, hosted flow, transaction references, signed events, settlement-aware status.
0PoolsEntitled pool, asset pair, side, amount, quote request, idempotent execution.Indicative/firm quote, trade id, trade status, partner-visible balances where approved.
0BaseCheckout/payment intent/link/invoice request, payout settings, ledger/report query.Payment-object records, settlement/report records, webhook delivery records where enabled.
0LinkRoute or connected workflow intent, quote context, fallback constraints where enabled.Route review, confirmation, status, settlement-handling context.
0Pools ScanProduct/protocol activity ids and filters.Explorer records, status pages, asset views, mint/burn events, analytics.

Request flow

The common request flow is:

  1. Your backend creates a durable internal record.
  2. Your backend calls the product API with sk_*.
  3. The product returns an object id and, where applicable, a browser-safe value.
  4. Your browser/mobile app renders the hosted or product-specific UX.
  5. 0Bit sends signed events as state changes.
  6. Your backend verifies, dedupes, and applies business state.
  7. Your operations tooling reconciles against trusted reads, ledgers, reports, and Scan visibility.

Example: 0Gate hosted flow

Example: 0Pools headless liquidity

Availability checks

Do not assume a route is available because a docs example exists. Runtime access depends on:

CheckExample failure
Environmentsk_test_* sent to production or sk_live_* sent to sandbox.
EntitlementOrganization is not enabled for the product.
Product configurationWebhook URL, allowed domain, pool access row, payout setting, or route policy is missing.
Compliance stateKYC/KYB or product review is not complete.
Corridor supportCountry, currency, asset, chain, payment method, or payout method is disabled.
Object stateQuote expired, session cancelled, payment failed, route unavailable, or object already terminal.

Continue

On this page