Skip to main content
Chainrails offers a React Native SDK for integrating payments into Solana Seeker mobile apps, with built-in access to the Seeker dApp wallet, the Seeker theme, and features designed specifically for Seeker devices. This guide walks you through the complete end-to-end setup to get Chainrails payments working in your Solana Seeker mobile app.

Overview

This guide uses @chainrails/react-native on the app side for the payment modal and hooks, and @chainrails/sdk on your backend to create session tokens. For the broader React Native integration, see Mobile Development.

Prerequisites

Before you begin, make sure you have:
  1. A React Native project
  2. A Chainrails API key from dashboard.chainrails.io
  3. A backend service where you can create session tokens securely

Step 1: Install the SDK

Install the React Native UI package in your app and the core SDK on your backend.

Step 2: Set Up Session Endpoint

Create a backend endpoint that generates secure session tokens. The mobile app calls this endpoint right before opening the payment modal.
At minimum, validate recipient, destinationChain, token, and amount before creating a session. For a Seeker-targeted flow, the destination chain is typically SOLANA.

Step 3: Open the Payment Modal

In your app, fetch a session from your backend and open the payment modal only after the session is ready.
Run it with:

Best Practices

  1. Never expose API keys client-side: Always use a backend session endpoint
  2. Validate all inputs: Check recipient addresses, chains, tokens, and amounts
  3. Use HTTPS: Ensure all communications are encrypted
  4. Implement rate limiting: Prevent session endpoint abuse

Additional Notes

  1. Live API keys cannot be used with test networks. In test environments you can use supported mainnets and testnets, but once you switch to a live API key you must use mainnet networks only.
  2. Testnets also do not have indexing support. If you are testing the modal on a testnet, users must click I have made payment after funding. If you are using API-driven flows, you must manually call POST /api/v1/intents/{intent_address}/trigger-processing to process the intent.

Next Steps

Github Example

Check out our Github demo repository for a full React Native example.