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
| Boundary | What to build | Why it matters |
|---|---|---|
| Failure taxonomy | Distinguish failed, expired, cancelled, underpaid, overpaid, and processing timeout. | Different outcomes need different recovery. |
| Order safety | Do not mark paid from failed or expired objects. | Protects fulfillment. |
| Fresh attempts | Create a fresh object for a fresh payment attempt. | Avoids stale terms. |
| Customer copy | Explain what happened and what the customer can do next. | Reduces support escalation. |
| Evidence | Keep raw status, reason, object ids, and timestamps. | Support can resolve edge cases. |
Status and state handling
| State | What it means | Developer action |
|---|---|---|
| Failed | Payment object ended in non-success. | Recover or support. |
| Expired | Customer did not complete in time. | Fresh object if still valid. |
| Cancelled | Merchant/user cancelled. | Close or recreate intentionally. |
| Recovered | New 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 0Base | With 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
| Evidence | What to store |
|---|---|
| Failure record | Raw status, reason/error code where available, object id, timestamp. |
| Recovery record | Retry allowed, replacement id, support owner. |
| Customer communication | Copy shown, email sent, support reference. |
| Order state | Unpaid/pending/manual review until terminal success. |
| Finance evidence | Any 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 mode | Recovery |
|---|---|
| Payment failed after customer paid on-chain | Preserve payment evidence and route to support/manual review. |
| Checkout expired but customer wants to pay | Create a fresh object if merchant order remains valid. |
| Cancelled order receives late payment | Do not auto-fulfill; use late-payment policy. |
| Repeated failures from same customer | Throttle 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 area | Use it for |
|---|---|
POST /checkouts/{id}/expire | Expire checkout. |
POST /payment_intents/{intentId}/cancel | Cancel intent. |
POST /payment_intents/{intentId}/refunds | Record refund where enabled. |
GET /reports/transactions | Review 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
| 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
- 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.