Allow your customers to buy NFTs with credit card and crypto payments, using Crossmint's hosted checkout. This quickstart provides a seamless integration for accepting payments in your dApp.
Key features:
- Accept fiat payments via credit, debit card, Apple Pay and Google Pay
- Accept crypto payments
- Deliver NFTs directly to a buyer's wallet or email address
- Create a developer account in the Staging Console.
- Create a new collection or import yours in the console, and have your
collectionId
ready. - Make sure your collection has at least one NFT configured
- From the detail view of your collection, navigate to the Checkout tab to configure the pricing settings and enable Credit Card and Crypto payments.
Easily deploy the template to Vercel with the button below. You will need to set the required environment variables in the Vercel dashboard.
-
Clone the repository and navigate to the project folder:
git clone https://github.com/crossmint/hosted-checkout-quickstart.git && cd hosted-checkout-quickstart
-
Install all dependencies:
npm install # or yarn install # or pnpm install # or bun install
-
Set up the environment variables by copying the template file:
cp .env.template .env
-
Add your Crossmint
collectionId
to the.env
file.NEXT_PUBLIC_CROSSMINT_COLLECTION_ID=your_collection_id
-
Get your client-side API key from the Crossmint Console Overview and add it to the
.env
file.NEXT_PUBLIC_CROSSMINT_API_KEY=your_api_key
-
Run the development server:
npm run dev # or yarn dev # or pnpm dev # or bun dev
- Create an account in the Production Console, add your collection and configure the payment settings from the Checkout tab.
- Verify your account as the project owner and verify your collection. Learn more about verifications.
- Update your
.env
file with your production variables. - Deploy your application to a production environment.
For advanced usage, refer to the Crossmint documentation:
- Customize the UI: https://docs.crossmint.com/payments/pay-button/guides/ui-customization
- Edit payment methods: https://docs.crossmint.com/payments/pay-button/guides/payment-methods