clearddocs
cleard.ai ↗
Guides Errors & retries
Markdown ↗

Errors & retries

Recover exact intents and receipts without duplicate payments or obligations.

HTTP retries#

Keep each POST’s original Idempotency-Key and exact JSON. Retry SERVICE_BUSY, TRANSACTION_PENDING, REQUEST_EXPIRED or LEASE_LOST with that pair after backoff or status lookup. REQUEST_EXPIRED is a worker deadline, not the commercial claim deadline. A changed body/key is a new request, not recovery. A scope denial, changed signature, business deadline or pin mismatch requires correction or operator review. A confirmed TRANSACTION_REVERTED receipt is terminal for its saved transaction; a new intent needs a resolved cause and remaining authorization. An HTML gateway response can have an unknown outcome, so preserve the same intent. The routing OpenAPI error catalog provides contextual recovery guidance.

HTTP 429 PURCHASE_CAPACITY and the contract revert OPEN_PURCHASE_LIMIT are capacity errors, not transient failures. See Sandbox limits. Stop creating purchases and contact Cleard if capacity is reached; credential renewal and onchain closure do not reset the program total.

Wallet and process interruption#

The browser saves intent before opening the wallet. If it loses a transaction hash, recover the exact original hash and nonce through its recovery form. Do not authorize a replacement payment. The SDK uses a durable raw-transaction journal and one exclusive lock for the wallet set. After a crash, establish that the old process stopped before removing only its lock; preserve every record.

Receipt ordering and reorgs#

Accounting deduplicates by transaction hash and log index. Out-of-order cumulative recovery logs fail until the earlier receipt is reconciled. A canonical block-hash change freezes the program for operator review. Automatic reorg repair is not implemented. Two L2 confirmations are required; they are not L1 finality.

Notification retries#

Repeat dispatch after backoff using the exact request body/key. An uncertain response may redeliver the same signed event ID; the receiver deduplicates it. See notification limits for dispatch and receiver bounds.

Routing OpenAPIStructured errors and operation schemas. Complete lifecycleAuthority, funding and status transitions.
Cleard · Commercial relationships for open commerce.Docs / Errors & retries

Searches these docs locally. Use Tab to choose a result.