Overview
Chainrails gives you a single payment modal that supports both:- Crypto deposits from supported chains and tokens
- Fiat deposits from 70+ countries
Get started in three steps
1
Installation
Install the UI SDK for your app and the core SDK for your backend session endpoint.
- React Web
- React Native
2
Set up a Session Endpoint
Create a backend endpoint that generates secure session tokens. This keeps your API key private and lets you control payment defaults.Where:
Here’s a curated Github template to help you get started quickly: Chainrails Demo Server
recipient: Wallet address that receives settled funds.amount: Target amount. Leave empty or set to0to let users enter an amount in the modal.destinationChain: Chain where funds should settle.token: Asset to receive on settlement.
3
Initialize the Payment Modal
Initialize the modal in your app and trigger it from a button.Parameters:
session_url: Your server endpoint for creating payment sessions.excludeChains(optional): Array of chains to exclude from payment options.
What happens next?
When a user opens the modal:- The SDK fetches a secure session token from your backend
- The modal presents available payment methods
- Users can complete a crypto deposit from supported chains/tokens or a fiat deposit through supported ramp providers
- Your
onSuccesscallback fires when the transaction completes - Funds settle to your configured
recipientand destination chain
Additional Notes
- Live API keys cannot be used with test networks. In test environments you can use supported mainnets and testnets, but live API keys must use mainnet networks only.
-
Testnets do not have indexing support. In modal flows, users must click I have made payment after funding on testnets. In API-driven flows, use
POST /api/v1/intents/{intent_address}/trigger-processingto process the intent manually.
View Github Code
Explore a complete Payment Modal example in our Github repository.

