Prerequisites
To use Relay with Crossmint wallets, you need:- A Crossmint wallet on any supported EVM chain
- A production API Key with the scope:
wallets:transactions.create(create in the Production Console)
- ETH on Base mainnet for gas fees (not required if gas sponsorship is enabled)
- For bridging: ETH on Base
- For swapping: USDC on Base
Bridge Tokens
Bridging moves the same token from one chain to another. This example bridges native ETH from Base to Arbitrum.Both the Relay API and Crossmint wallets must support the source and destination chains. Most major EVM chains are supported, but for less common chains, verify support on the Relay supported chains page and the Crossmint supported chains list before proceeding.
- Request a bridge quote from the Relay
/quote/v2endpoint - Execute the bridge transaction using the quote calldata
- Poll the Relay
/intents/status/v3endpoint until the bridge completes
- React
- React Native
- Node.js
- REST
Swap Tokens
Swapping exchanges one token for another across chains or within the same chain. This example swaps USDC on Base for USDC on Arbitrum. The same pattern works for any token pair that Relay supports. For ERC-20 swaps, Relay may return multiple steps — an approval step followed by a deposit step. The code below iterates through all steps to handle both cases. High level steps:- Request a swap quote from the Relay
/quote/v2endpoint - Execute all steps from the quote (approval + deposit)
- Poll the Relay
/intents/status/v3endpoint until the swap completes
- React
- React Native
- Node.js
- REST
Customizing the Route
You can bridge or swap any token pair that Relay supports by changing the chain IDs and token addresses:Testing the Integration
To test the integration end-to-end:- Create a Crossmint wallet on Base using the Crossmint Console
- Fund the wallet with a small amount of ETH on Base for gas (and USDC if testing the swap)
- Run the bridge or swap code with a small amount (for example, 0.001 ETH for bridging or 1 USDC for swapping)
- Verify the transaction completes by checking the status polling returns
success - Confirm the destination wallet balance updated on the destination chain using the Check Balances guide
Relay also supports testnets (Base Sepolia, Sepolia, etc.), but testnet availability may vary. Check the Relay supported chains page for the latest testnet status.
Troubleshooting
Transaction Fails with Insufficient Balance
Transaction Fails with Insufficient Balance
Verify the wallet holds enough tokens on the source chain and ETH for gas fees.
Use the Check Balances guide to confirm token balances before bridging or swapping.
Quote Request Returns an Error
Quote Request Returns an Error
Ensure the
user address is a valid wallet address and the amount is in the smallest unit (wei for ETH, or the token’s smallest denomination — for example, 6 decimals for USDC).
Verify the origin and destination chain IDs and token addresses are correct.
Check the Relay supported chains to confirm the route is available.ERC-20 Swap Requires Multiple Transactions
ERC-20 Swap Requires Multiple Transactions
For ERC-20 tokens, Relay may return an approval step before the deposit step. Make sure to iterate through all
steps and all items within each step. Only execute items where status is "incomplete".Bridge or Swap Status Stays Pending for a Long Time
Bridge or Swap Status Stays Pending for a Long Time
Cross-chain operations can take several minutes depending on the route and chain congestion.
If the status does not change after 10 minutes, check the source transaction on a block explorer to verify it was included.
Deposits Not Detected by Relay (Smart Contract Wallets)
Deposits Not Detected by Relay (Smart Contract Wallets)
If Relay is not detecting deposits from a Crossmint smart wallet, try adding
useReceiver: true to the quote request body. This routes the payment through a receiver contract that emits events, allowing the Relay solver to detect deposits from smart contract wallets.Next Steps
Check Balances
Verify updated token balances after bridging or swapping on any chain
Bridge with LI.FI
Compare with the LI.FI bridging integration for alternative routes

