Skip to main content
In this guide, you will learn how to:
  • Install the React 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

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.

1. Prerequisites

1

Install the SDK

Install the Crossmint client 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.local:
.env.local

2. Create the Server Action

Create a server action that will create orders via the Crossmint API:
app/actions/createOrder.ts

3. Build the Onramp Component

Create a client component that handles the order creation and displays the embedded checkout:
app/components/OnrampCheckout.tsx

4. Add the Component to Your Page

Import and render the OnrampCheckout component in your page:
app/page.tsx
That’s it! When users fill in their details and click “Continue to Checkout”, the server action 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.

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.

Next Steps