0Bit Documentation

Payment notifications

Use webhook and notification records to update merchant systems idempotently.

Payment notifications let a merchant backend react to 0Base state changes without asking the browser to carry money state. A production handler verifies signatures, dedupes event ids, stores delivery evidence, reads current object state when needed, and applies business effects exactly once.

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: 0Base event -> Webhook delivery -> Verify signature -> Dedupe event -> Read current object -> Apply business effect. 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

BoundaryWhat to buildWhy it matters
Endpoint responsibilityWebhook endpoint belongs to the merchant backend, not the browser.Keeps payment state trusted.
Signature verificationVerify signed test and live events according to API guidance.Rejects spoofed events.
DedupeStore event id before side effects.Prevents duplicate fulfillment.
Current-state readRead payment intent if event ordering is uncertain.Protects against stale events.
Replay handlingReplay failed/dead deliveries safely.Recovery does not double-apply effects.

Status and state handling

StateWhat it meansDeveloper action
Pending deliveryDelivery is queued or not yet delivered.Wait/monitor.
DeliveredMerchant endpoint accepted the event.Handler still must process idempotently.
DeadDelivery exhausted or failed.Replay or repair.
ProcessedMerchant business effect applied once.Record outcome.

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 payment notifications. 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.

{
  "event_id": "evt_base_123",
  "delivery_id": "whd_456",
  "event_type": "payment_intent.succeeded",
  "intent_id": "pi_live_456",
  "delivery_status": "delivered",
  "signature_verified": true,
  "handler_result": "order_fulfilled_once"
}

Operational scenario

Webhooks should make the merchant more reliable, not more fragile. If the endpoint is down, 0Base delivery logs and replay give a recovery path, while the merchant handler dedupes event ids to avoid double effects.

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 0BaseWith 0Base
Browser callback owned fulfillment.Signed backend notification owns state change.
Duplicate events shipped twice.Event id dedupe makes side effects once-only.
Failed deliveries disappeared.Delivery logs and replay expose recovery.
Handlers trusted event order.Handlers read current object state when needed.

Evidence to keep

EvidenceWhat to store
Delivery recordDelivery id, event id, event type, status, attempts, last error.
Verification recordSignature result, timestamp, handler version.
Dedupe recordEvent id, object id, processing status.
Business effectOrder status change, ledger update, email/send result.
Replay recordWho replayed, why, result, current object status.

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 modeRecovery
Endpoint returns 500Delivery retries or becomes dead; replay after fixing handler.
Event arrives twiceReturn success from dedupe path without repeating fulfillment.
Event arrives after manual status readCompare current object status and apply idempotently.
Signature failsReject and investigate endpoint configuration.

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 areaUse it for
GET /webhooks/deliveriesList delivery log.
POST /webhooks/deliveries/{id}/replayReplay dead delivery.
POST /webhooks/testGenerate signed test event.
GET /payment_intents/{intentId}Read current object state.

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

Payment notifications let merchants react to payment changes without trusting the browser. Signed, idempotent events are essential for reliable commerce because networks and customers do not always move in one synchronous step.

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 GET https://base-api-sandbox.0bit.app/v1/webhooks/deliveries \
  -H "Authorization: Bearer $OBIT_SECRET_KEY"

Example response shape:

{
  "object": "list",
  "data": [
    {
      "object": "webhook_delivery",
      "id": "whd_test_123",
      "event_id": "evt_test_456",
      "event_type": "payment_intent.succeeded",
      "intent_id": "pi_test_456",
      "status": "delivered",
      "attempts": 1,
      "last_error": null
    }
  ]
}

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

SignalCheck firstAction
Customer reports payment not updatingLook up merchant order id, 0Base object id, raw status, and latest webhook delivery.Read current object state before changing fulfillment.
Webhook delivery failedCheck delivery id, event id, attempts, last error, and handler logs.Fix the handler, replay once, and dedupe by event id.
Finance cannot match a rowCompare 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

  • Verify signatures before parsing business effects.
  • Persist event id before side effects.
  • Make handlers idempotent.
  • Read current object state for terminal changes.
  • Monitor dead deliveries.
  • Test replay before launch.

On this page