Skip to main content

Order status lifecycle

Every AnySpend order moves through these states:
Order statuses

Error codes

Payment errors

User doesn’t have enough tokens. Prompt them to add funds or switch to a different token.
Token contract isn’t supported on the target chain. Show the user which tokens are available.
Transaction amount is below the minimum threshold.
Transaction amount exceeds the limit. Split into multiple transactions or reduce the amount.

Network errors

Price moved beyond tolerance during execution. Retry or wait for the market to settle.
RPC connection issue or chain congestion. Retry after a short delay.
Price quote is stale. Fetch a new one.
Requested chain isn’t supported. Show the user which chains are available.

Contract errors

Smart contract execution failed. Double-check the contract parameters and state.
Gas limit was too low. Retry with a higher limit.
Nonce conflict from a pending transaction. Wait for the pending tx to confirm, then retry.
The contract reverted. Usually means a precondition wasn’t met (e.g., sale ended, not enough allowance).

Error handling patterns

Per-component error handling

Payment with error handling

Order status monitoring

Order tracker

Error boundary

Wrap AnySpend components in an error boundary to catch rendering crashes:
Error boundary

User-friendly error messages

A helper that maps error codes to messages your users can actually understand:
Error message helper

Tips

  • Keep users informed during long operations. Cross-chain transactions can take a few minutes — show progress, not just a spinner.
  • Retry transient errors (slippage, network, quote expired) with exponential backoff. Many resolve on the second try.
  • Log errors with context (order ID, user address, timestamp) so you can debug issues after the fact.
  • Offer fallbacks when possible. If cross-chain fails, suggest same-chain. If crypto fails, suggest fiat onramp.

Getting help

Discord

Get help from the community and support team

GitHub

Report bugs and request features
When reporting issues, include: error message/code, steps to reproduce, browser/device info, and order ID if applicable.