NFT sales are not self-serve in production. You can build and test NFT sales in staging. In production, Crossmint only enables them by exception for enterprise programs, and at this moment is not onboarding new projects. If yours is part of a broader payments initiative, contact sales. Minting and airdrops stay available.
Introduction
In this quickstart you sell an NFT for a card payment, including Apple Pay and Google Pay. Your server creates the order with the Orders REST API. Then your frontend renders the Crossmint Embedded Checkout component to collect the card, so your app does not handle raw card data.This flow uses two API keys. Your server creates the order with a server-side API key. Your frontend renders the Embedded Checkout with a client-side API key and the
clientSecret of the order. To let Crossmint handle the full flow, see the Embedded quickstart.Prerequisites
From Crossmint
- Staging account: create a developer account in the Staging Console.
- Collection: create a collection or import yours, and copy its
collectionId. The collection needs at least one NFT, and a price within the limits in staging. - Payment methods: in the console, open the collection's Payments tab and turn on card payments, crypto payments, or both. Otherwise the Create Order API returns an error.
- Server-side API key: create a server-side API key with the
orders.create,orders.update, andorders.readscopes.
The examples call the API from a server with a server-side API key. Never expose this key in a browser or mobile app. To call the API from a client, see Environments & API Keys.
- Client-side API key: create a client-side API key in the same project for the Embedded Checkout.
- React app: the frontend example uses React and
@crossmint/client-sdk-react-ui.
Integration Steps
1
Create the order on your server
Create an order with the recipient, the card payment method, and the collection. Refer to the Create Order API reference for all parameters.Send
POST https://staging.crossmint.com/api/2022-06-09/ordersorder.orderId and clientSecret to your frontend for the next step.A card order needs an email for the receipt. Crossmint uses
recipient.email. If you deliver to recipient.walletAddress instead, also set payment.receiptEmail. Without an email, payment.status stays requires-email and the checkout cannot collect the card.Example response
Example response
2
Render the Embedded Checkout in your frontend
Install the React SDK:Render In staging, pay with the test card
CrossmintEmbeddedCheckout with the orderId and clientSecret from the previous step. The props below show only the card form, and hide the recipient and email inputs because the order already has them.4242 4242 4242 4242, any future expiry date, and any CVC. See Testing Tips for more test cards. To change the look of the checkout, see Appearance.3
Get the order status
Call the Get Order API until When the order is complete, the recipient gets an email with a link to the NFT. If the card is declined or the payment is refunded, the order shows it in
phase is completed. The phase changes from payment to delivery, and then to completed.GET https://staging.crossmint.com/api/2022-06-09/orders/<orderId>payment.failureReason or payment.refunded. See Declines and Refunds.Sell Tokens Instead of NFTs
Enterprise feature. Contact us for access.
tokenLocator and executionParameters instead of collectionLocator, and deliver to a wallet address:
tokenLocator: the token, in the format<chain>:<tokenAddress>. In staging, only the XMEME test token (7EivYFyNfgGj8xbUymR7J4LuxUHLKRzpLaERHLvi7Dgu) works.executionParameters.mode:exact-inmeans that the buyer spends an exact amount.executionParameters.amount: the amount in USD that the buyer spends.executionParameters.maxSlippageBps: optional. If you do not set it, Crossmint applies a default slippage.
tokenLocator formats.
Important Notes
Compliance Checks
Crossmint runs compliance checks on all tokens to ensure they do not qualify as securities or currencies under
applicable regulations. Transactions for tokens that are determined to be too similar to securities or
currencies will fail.
Supported Tokens
Memecoin checkout supports the Solana and Base networks. You can check which tokens are supported by using
the fungibleCheckoutAvailable endpoint. A more in depth guide on token
support is here.
Delivery to External Wallets Only
Memecoin checkout only delivers memecoins to EOAs (Externally Owned Accounts), not Crossmint supported delivery
solutions, such as on-the-fly wallet creation (both Crossmint
custodial wallets and smart wallet), delivery to Twitter handle, etc.
Merchant of Record
Crossmint remains the merchant of record for all transactions. Your buyers will still receive delivery
receipts and transaction
confirmations from Crossmint.
Launching in Production
You can now receive payments for anything on the blockchain, and display it in whatever UI you choose to build. Headless checkout is gated in production. To get started, contact us.Learn More
Appearance
Match the checkout to your brand
Webhooks
Get order updates on your server
Create Order API
Try the API in the playground

