0Bit Documentation

Failed and expired payments

Handle 0Base failed, cancelled, expired, and delayed payment states safely.

Failed and expired payments are normal production outcomes. A strong 0Base integration gives customers a clear recovery path, keeps the merchant order safe, prevents duplicate payment attempts, and leaves enough evidence for support and finance.

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: Payment attempt -> Failure or expiry -> Order remains unpaid -> Recovery decision -> Fresh payment object -> Support/finance evidence. 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
Failure taxonomyDistinguish failed, expired, cancelled, underpaid, overpaid, and processing timeout.Different outcomes need different recovery.
Order safetyDo not mark paid from failed or expired objects.Protects fulfillment.
Fresh attemptsCreate a fresh object for a fresh payment attempt.Avoids stale terms.
Customer copyExplain what happened and what the customer can do next.Reduces support escalation.
EvidenceKeep raw status, reason, object ids, and timestamps.Support can resolve edge cases.

Status and state handling

StateWhat it meansDeveloper action
FailedPayment object ended in non-success.Recover or support.
ExpiredCustomer did not complete in time.Fresh object if still valid.
CancelledMerchant/user cancelled.Close or recreate intentionally.
RecoveredNew object succeeds or support resolves.Join old and new ids.

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 failed and expired 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.

{
  "original_payment_intent_id": "pi_live_old",
  "status": "expired",
  "merchant_order_id": "ord_100045",
  "recovery_action": "create_fresh_checkout",
  "replacement_checkout_id": "chk_live_new",
  "support_state": "customer_can_retry"
}

Operational scenario

Failure handling is a product experience. The customer should see a specific path, the merchant order should remain safe, and support should have enough information to explain whether the customer can retry, wait, or contact support.

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
Failure showed a generic error page.Failure state maps to clear recovery copy.
Expired checkout still looked payable.Expired objects are hidden and replaced intentionally.
Support asked for screenshots.Support starts from raw status and object ids.
Retry created duplicate fulfillment risk.Fresh attempts are joined to the same merchant order with idempotent rules.

Evidence to keep

EvidenceWhat to store
Failure recordRaw status, reason/error code where available, object id, timestamp.
Recovery recordRetry allowed, replacement id, support owner.
Customer communicationCopy shown, email sent, support reference.
Order stateUnpaid/pending/manual review until terminal success.
Finance evidenceAny received amount, ledger/refund record where applicable.

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
Payment failed after customer paid on-chainPreserve payment evidence and route to support/manual review.
Checkout expired but customer wants to payCreate a fresh object if merchant order remains valid.
Cancelled order receives late paymentDo not auto-fulfill; use late-payment policy.
Repeated failures from same customerThrottle or escalate with support reference.

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
POST /checkouts/{id}/expireExpire checkout.
POST /payment_intents/{intentId}/cancelCancel intent.
POST /payment_intents/{intentId}/refundsRecord refund where enabled.
GET /reports/transactionsReview failed/expired totals.

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

Failures and expiries are part of normal checkout. Treating them as designed states gives customers clear recovery paths and gives merchants safe order handling instead of ambiguous support tickets.

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/checkouts/chk_test_123/expire \
  -H "Authorization: Bearer $OBIT_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ord_100045:base:v1" \
  -d '
{}'

Example response shape:

{
  "checkout_id": "chk_test_123",
  "status": "expired",
  "amount": "129.00",
  "currency": "EUR",
  "crypto_currency": "USDT",
  "expires_at": "2026-06-28T21:00:00Z"
}

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

  • Name every non-success state.
  • Keep order unpaid until terminal success.
  • Use fresh payment objects for fresh attempts.
  • Join replacement ids to original order.
  • Show customer-safe recovery copy.
  • Review failure queues daily after launch.

On this page