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
| Plane | Owns | Security boundary |
|---|---|---|
| Partner backend | Your 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/mobile | Hosted/embedded UX, redirect handling, pending screens, user-visible progress. | Receives only browser-safe values approved by the product. |
| 0Bit identity and entitlements | Organization, users, keys, enabled products, product-specific access checks. | A key can be valid but still not entitled for a product. |
| Product APIs | 0Gate sessions, 0Pools quotes/trades, 0Base payment objects, 0Link route/workflow records. | Versioned product contracts; availability depends on setup and environment. |
| Event delivery | Signed asynchronous product events. | Verify raw body, timestamp, and signature before applying state. |
| Scan/reports/ledgers | Visibility, support, finance, reconciliation. | Operational context, not a substitute for webhook verification. |
Product boundaries
| Product | Inputs | Outputs |
|---|---|---|
| 0Gate | Amount, currency, return URL, optional flow constraints, browser-safe embed values. | Session, hosted flow, transaction references, signed events, settlement-aware status. |
| 0Pools | Entitled pool, asset pair, side, amount, quote request, idempotent execution. | Indicative/firm quote, trade id, trade status, partner-visible balances where approved. |
| 0Base | Checkout/payment intent/link/invoice request, payout settings, ledger/report query. | Payment-object records, settlement/report records, webhook delivery records where enabled. |
| 0Link | Route or connected workflow intent, quote context, fallback constraints where enabled. | Route review, confirmation, status, settlement-handling context. |
| 0Pools Scan | Product/protocol activity ids and filters. | Explorer records, status pages, asset views, mint/burn events, analytics. |
Request flow
The common request flow is:
- Your backend creates a durable internal record.
- Your backend calls the product API with
sk_*. - The product returns an object id and, where applicable, a browser-safe value.
- Your browser/mobile app renders the hosted or product-specific UX.
- 0Bit sends signed events as state changes.
- Your backend verifies, dedupes, and applies business state.
- 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:
| Check | Example failure |
|---|---|
| Environment | sk_test_* sent to production or sk_live_* sent to sandbox. |
| Entitlement | Organization is not enabled for the product. |
| Product configuration | Webhook URL, allowed domain, pool access row, payout setting, or route policy is missing. |
| Compliance state | KYC/KYB or product review is not complete. |
| Corridor support | Country, currency, asset, chain, payment method, or payout method is disabled. |
| Object state | Quote expired, session cancelled, payment failed, route unavailable, or object already terminal. |