Add a digital asset checkout button to a demo app in under 5 minutes
projectId
and collectionId
ready.recipient
parameter. For more advanced contracts, check the SDK
reference.@crossmint/client-sdk-react-ui
dependency and add the embedded checkout component. To get started:
Create a new Next.js application
y
and press Enter
to proceed:Name your app `crossmint-embedded-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
Obtain your `projectId` and `collectionId` from your collection detail view in the console
Add a new file named `.env.local` to root directory of your project
Open the `/src/app/page.tsx` file in your editor
Run the application from your terminal
http://localhost:3000/
. The Hosted Checkout Button will appear in the top left of the browser. You can click it to open the checkout popup and ensure everything is configured properly.