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

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.

Validate your collection meets the requirements

  • EVM

  • Solana

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 mintConfig of your button 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 ERC20 transfer function 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.
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