By denominating your collection in USDC, you can eliminate price volatility, and offer a more accessible experience to users.

If you are using our previous version of embedded checkout, please refer to the old USDC support guide

Ensure you are using a supported USDC token

First of all, make sure your collection is denominated in one of the USDC token addresses supported by Crossmint.

ChainNetworkUSDC Token AddressUSDXM Token Address

USDC.e is only supported on previously registered integrations on Polygon mainnet. Please use the native USDC address for new projects.

If you need some testnet USDC you can mint it freely from the contract or from this faucet app that uses the same testnet token contracts as the NFT Checkout tools.

Crossmint Testnet USDXM Faucet

Validate your collection meets the requirements

In addition to the standard requirements, keep in mind:

  1. The mint function should be nonpayable.
  2. The USDC token has 6 decimals instead of 18 like ETH, Matic, and most other tokens.
  3. The totalPrice attribute in the callData of your lineItems should be in units of USDC. If your intended price is 100 USD, then you will set totalPrice to 100 e.g. totalPrice="100".
  4. Your ERC-20 transfer call must request the funds from msg.sender instead of the address parameter. This allows Crossmint to pay from our fleet of treasury wallets and deliver the NFTs directly to the user’s wallet. See an example mint function below.
Solidity
function mintUSDC(address _to) public {
  // pre payment logic here

  // note that you need to transfer from msg.sender, NOT the _to address
  tokenInstance.transferFrom(msg.sender, address(this), priceUSDC );

  // actual minting logic here
}
<CrossmintProvider apiKey="_YOUR_CLIENT_API_KEY_">
    <CrossmintEmbeddedCheckout
        lineItems={{
            collectionLocator: "crossmint:_YOUR_COLLECTION_ID_",
            callData: {
                totalPrice: "100", // 100 USDC
                quantity: 1,
            }
        }}
    />
</CrossmintProvider>
The totalPrice attribute in the callData of your lineItems should be in units of USDC. If your intended price is 100 USD, then you will set totalPrice to 100 e.g. totalPrice="100".