Skip to main content
In this guide, you will learn how to:
  • Install the React Native SDK
  • Create an Onramp order for your authenticated users
  • Use the embedded checkout component to handle KYC, payment, and delivery
Crossmint Onramp Embedded Checkout Demo

Whitelabel Onramp in React Native

Before you start

Set up your project and get an API key.

Onramp Embedded Quickstart

See a full working example.
You can test the Onramp self-serve in staging. To enable it in production, contact sales.

Requirements

  • React Native 0.60+
  • Expo (recommended) or bare React Native CLI
  • iOS 13.0+ / Android 5.0+

1. Prerequisites

1

Install the SDK

2

Create API keys

Create a server-side API key with the orders.create and orders.read scopes enabled.
Create a client-side API key for the embedded checkout component.
3

Add environment variables

Add environment variables to your .env:
.env
For Expo projects, use the EXPO_PUBLIC_ prefix. For bare React Native, configure environment variables according to your setup.

2. Create the API Endpoint

If you want to enable onramp orders to external wallets (EOAs or third-party smart wallets) instead of Crossmint wallets, see the Onramp to External Wallets guide before proceeding.
To initiate an onramp, you must first create a purchase order on your backend. This example uses Express, but you can use any backend framework:
server/createOrder.ts

3. Build an Onramp checkout UI in your app

Now let’s go to your app. Create a React Native screen that handles order creation and displays a checkout:
screens/OnrampScreen.tsx

4. Add the Screen to Your App

Import and render the OnrampScreen in your app:
App.tsx
That’s it! When users fill in their details and tap “Continue to Checkout”, the API creates an order and the embedded checkout component handles KYC, payment, and delivery automatically.
Testing: Use the test credit card number 4242 4242 4242 4242 with any future expiration date and any 3-digit CVC.

5. Transaction Completion

Upon successful payment:
1

KYC Verification

The embedded checkout component handles all the complexity of KYC verification automatically.
2

Token Delivery

The purchased tokens (minus fees) are sent directly to the user's wallet.
3

Receipt Sent

User receives an email receipt from hello@crossmint.io.

6. Next Steps