Handling Failures and Recovery
The 0x Cross-Chain API is in private beta. Request access to start building.
Cross-chain swaps are non-atomic as they span two chains and a bridge provider in between. If the origin transaction succeeds but the bridge cannot complete, the user’s funds have left their wallet and need to be recovered.
This page explains what happens when a bridge fails, how recovery works, and what your integration should do for each scenario. For the happy-path status lifecycle, see Tracking Transaction Status.
How Failures Surface
When you poll GET /cross-chain/status and the response has status: "bridge_failed", it includes a failure object with everything needed to understand what went wrong and what to do next.
Failure Object Structure
Failure Reasons
Failure Statuses
Recovery Step Fields
Refund Token and Chain
The refund token and chain depend on where the failure happened and what the route looked like. The refund is not always in the user’s original sellToken on originChain. What you get back depends on the bridge (see table below) and the route composition.
The main thing to understand: the refund token is based on the bridge step’s sell or buy token and not the route’s sellToken. If the route included a swap or wrap before the bridge, the bridge step’s tokens differ from what the user started with:
The recovery.token, recovery.chainId, and recovery.amount fields contain the exact refund details.
Manual Recovery Transactions
When manualTransaction is present, it’s a complete transaction.
EVM:
Submit via eth_sendTransaction on chain recovery.chainId.
Solana:
Base64-decode, sign, submit.
- Can be submitted by anyone, not just the original sender
- If
deadlineis set, submit before it expires as otherwise funds might be lost
Tracking Refund Progress
For automatic refunds, keep polling /status:
bridge_failed+refund_pending- refund initiatedbridge_failed+refund_succeeded- refund confirmed,failure.transactionshas refund tx hash andrecovery.settledAmounthas actual refunded amount
Recovery Behavior by Bridge
In this table, “bridge step’s sell/buy token” refers to the tokens on the bridge step specifically - not the user’s original sellToken/buyToken from the quote request. If the route included a swap or wrap before the bridge, these are different. See Refund Token and Chain above.
Important: Arbitrum Bridge is the only bridge with a recovery deadline. The deadline field contains a Unix timestamp. If the user does not submit the manualTransaction before this time, funds may be permanently lost. Always display the deadline prominently.
For bridges marked “Not tracked”, the 0x status service does not track the recovery process. The bridge provider may still offer recovery through their own tools. Contact 0x support with the zid for assistance.
Example: Automatic Refund (Across)
Example: Manual Recovery with Transaction (Stargate)
A Stargate bridge delivering to Arbitrum (chain 42161) ran out of gas on destination: