Overview
Every Chainrails transaction follows three simple steps from setup to completion:Request a Quote
Define the parameters for the transaction (the intent) — amount, source chain, source token, destination chain, recipient, and refund address. This tells Chainrails what the user wants to send and where it’s going.Generate an Intent Address
Once the quote is confirmed, Chainrails creates a unique intent address for that transaction. Think of this as a one-time deposit address that tracks and processes the transfer logic automatically.Fund the Intent
The user then funds this intent address directly from their wallet. Once funded, Chainrails takes care of the rest — executing the cross-chain transfer, routing liquidity, and confirming settlement. The SDK abstracts most of these steps, so you can integrate this entire flow in just a few lines of code. In this Quickstart, we’ll walk you through how to get up and running in minutes.Get started in three steps
Set up a Session Endpoint
Create a backend endpoint that generates secure session tokens. This protects your API key and prevents abuse.Where:
Here’s a curated Github template to help you get started quickly: Chainrails Demo Server
recipient: Your wallet address to receive payments/deposits.amount: The amount to be paid/deposited. Leave empty or set to 0 to allow user input.destinationChain: The blockchain network to receive payments to.token: The token/currency you want to receive.amount: The amount to be paid/deposited. Leave empty or set to 0 to allow user input.
What happens next?
When users click the payment button:- The SDK fetches a secure session token from your backend
- Users see the payment modal with their wallet connection options
- They can pay from any supported chain/token (Chainrails handles bridging)
- Your
onSuccesscallback fires when the transaction completes - Funds arrive in your
recipientaddress on your chosen chain
View Github Code
Explore a complete example of the Payment Modal integration in our GitHub repository.

