Pay with Trails
Trails revolutionizes crypto purchases by enabling users to buy NFTs, RWAs, or any other asset using any token a user holds from any supported chain. The payee simply specifies the settlement asset that they would like the payment to be reconciled in or to successfully complete the purchase, for example USDC, ETH, or any other token and the payer can select how they’d like to pay from their aggregated balance. For example, if a user wants to purchase an NFT that is listed in USDC on Arbitrum, Trails will automatically detect the funds the user currently holds in their wallet across all chains, presents those as options to fulfill the payment, and automatically handles any bridging, swapping, or execution logic if necessary to complete the transaction.Use Cases
Pay flows in Trails are modeled as exact output by default. This means the developer simply defines the total amount the payee should receive for the payment and Trails will automatically include any additional fees to successfully fulfill the payment. For example, “I want to receive exactly 1 USDC tokens on the destination chain, so the user will send 1.01 USDC on the origin chain.” Ideal for use cases such as the following:- Purchase and/or mint an NFT directly from a marketplace on any chain
- Use crypto to make a purchase at an ecommerce platform
- Transfer a specific amount of funds to a user
- Make an x402 payment in any token from any chain
- Execute smart contract calls with an attached payment
Examples
Simple Payment
Basic payment setup - pay exactly 1 USDC to a recipient:Purchasing an NFT on Arbitrum
This example shows how to use the Trails widget to purchase an NFT on Arbitrum, where the user can pay with any token from any chain that automatically gets converted to ETH to fulfill the purchase:Next Steps
Explore more about configuring and customizing payment flows:- Pay Mode Configuration - Complete configuration options and parameters for pay mode
- SDK Configuration - Widget setup, callbacks, and event handling
- Widget Theming - Customize the appearance to match your brand
- Hooks Reference - Available hooks for programmatic control (useQuote, usePay, etc.)
- Tokens & Chains - Configure payment tokens and destination chains
- x402 Payment Example - Advanced example with HTTP 402 payment flows