What users can fund from
- Crypto wallet: any token on any supported chain — Polygon, Ethereum, Base, Arbitrum, and more
- Another app or exchange: funds held in Coinbase, Binance, or any other wallet the user connects
- Credit or debit card: card payments convert to USDC and land in your destination address in one flow
- Bank account: ACH and bank transfer onramp, built in
Drop-in widget
The fastest integration. Wrap any button or UI element withTrailsWidget in fund mode:
Pre-set an amount
PasstoAmount to pre-populate the deposit value. Users can adjust it before confirming:
Default to fiat onramp
SetdefaultInputMode="fiat" to open the widget on the card/bank tab by default. Useful for apps where most users are funding from fiat rather than existing crypto:
Fund a smart contract
To deposit directly into a protocol, vault, or exchange contract on arrival, passtoCalldata with the encoded function call. Trails executes the calldata on the destination chain after routing funds:
TRAILS_ROUTER_PLACEHOLDER_AMOUNT is replaced with the exact routed amount at execution time, so the vault receives the correct figure regardless of bridging or swap slippage.
Widget props
| Prop | Type | Description |
|---|---|---|
apiKey | string | Your Trails API key |
mode | "fund" | Fund mode |
toAddress | string | Destination wallet or contract address |
toChainId | number | Destination chain ID |
toToken | string | Destination token symbol or address |
toAmount | string | Pre-set deposit amount (user can adjust) |
toCalldata | string | Encoded contract call to execute on arrival |
defaultInputMode | "fiat" | "token" | Which tab opens by default |
onCheckoutStart | function | Called when deposit is initiated |
onCheckoutComplete | ({ sessionId }) => void | Called on successful deposit |
onCheckoutError | function | Called on failure |
Headless SDK
For custom UI, useuseQuote from the headless SDK. You control the presentation; Trails handles execution:
Supported chains and tokens
Trails supports all major EVM chains. Users can fund from any supported chain regardless of where your destination address lives.Next steps
Cross-chain movement
Move tokens between wallets and chains without protocol interaction.
Yield accounts
Route funded USDC directly into a Morpho yield vault on arrival.
Smart Sessions
Automate recurring deposits without per-transaction prompts.
Trails API reference
Full endpoint reference, SDK docs, and widget customization options.