
You will build this demo
Before you start
Set up your project and get an API key.
Onramp Embedded Quickstart
See a full working example.
You can start testing Onramp in staging. Once you are ready to go live, reach out to
sales to enable the feature in production
- Create a Crossmint order for a user authenticated in your app
- Use Crossmint’s embedded checkout component to handle KYC, payment, and delivery automatically
1. Prerequisites
1
Install the SDK
Install the Crossmint client SDK:
2
Create API keys
Create a server-side API key with the
Create a client-side API key for the embedded checkout component.
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
:2. Create Order
Use the Create Order API to initiate the purchase process. Use the following token addresses for USDC:Chain | Staging | Production |
---|---|---|
Solana | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
Base | 0x036CbD53842c5426634e7929541eC2318f3dCF7e | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
🚨 IMPORTANT: The user email you send as a parameter (on
payment.receiptEmail
) must correspond to a user authenticated
by your application. This email is used by Crossmint to determine whether KYC is required for the order.Example Response
Example Response
3. Use Embedded Checkout
Once you have the order response withorderId
and clientSecret
, use Crossmint’s embedded checkout component to handle the entire KYC, payment and delivery flow automatically:
4. Transaction Completion
Upon successful payment:- The purchased tokens (minus fees) are sent directly to the user’s wallet
- User receives an email receipt from hello@crossmint.io
- The embedded checkout component handles all the complexity of KYC verification and payment processing automatically
5. Next Steps
- Explore our Payment Methods Guide to learn about different payment options
- Check out our Production Launch Guide for going live