Quickstart ⚡
Embed a checkout into a web app in under 5 minutes
You will build this demo
If you are using our previous version of embedded checkout, please refer to the old quickstart guide
Introduction
In this guide, you will create a web app with Next.js which allows customers to buy NFTs with credit card and crypto payments, using Crossmint’s embedded checkout.
From Crossmint
- Create a developer account in the Staging Console.
- Create a new collection or import yours into the console, and have your
collectionId
ready.- Make sure you follow the maximum prices for collections set in staging outlined here.
- Create a client-side API key with the
orders.create
scope enabled. More info on creating API keys here.
To integrate in production/mainnet, you'll also need to complete account and collection verification. More information in the production launch guide.
Integration Steps
This guide will start from scratch with an empty Next.js application. You'll install the required @crossmint/client-sdk-react-ui
dependency and add the NFT checkout component. To get started:
Set up the Project
Create a new Next.js application
If you see this message, type y
and press Enter
to proceed:
Name your app `crossmint-nft-checkout-demo` and accept the default options
Change into the directory created in previous steps
Install @crossmint/client-sdk-react-ui
Open the project in your preferred code editor
Basic Integration
Perfect for getting started quickly with a simple checkout flow.
Add environment variables
Create .env.local
in your project root:
Create the checkout page
Create /src/app/page.tsx
with:
Run your app
Visit http://localhost:3000
to see your checkout!
Advanced Integration
Need purchase tracking, multiple NFTs, or more customization? Here’s a complete setup with additional features:
This advanced example showcases: - Multiple NFTs in one checkout - Purchase status tracking - Preferred payment methods and currencies - Email-based NFT delivery - Language settings Learn more in our guides: - Payment Methods - Multi-purchases - React Hooks
Testing Your Integration
This demo uses the staging environment: - Use test credit cards for payments - Get test USDC from our faucet - Check price limits for staging
All Set!
You’ve successfully integrated card and crypto payments with the Crossmint Embedded Checkout!
Remember this demo is built on staging, so the NFTs will show up on the testnets. To launch on production, check the production launch checklist. You will need to contact Sales to enable the embedded checkout on production.
Next Steps
Customize the UI and Behavior Further
UI Customization
Learn how to customize the look and feel of your checkout
Payment Methods
Configure available payment options for your users
React Hooks
Use React hooks to build custom checkout experiences