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 Checkout tools.Crossmint Testnet USDXM Faucet
In addition to the standard requirements, keep in mind:
The mint function should be nonpayable.
The USDC token has 6 decimals instead of 18 like ETH, Matic, and most other tokens.
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".
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}
Using a thirdweb contract?
Add a claim phase with currency type USDC. In staging. you must use Custom ERC-20 and specify one of the token address listed above. In mainnet, you should select the default USDC option.
Denominate your candy machine on USDC and Crossmint will automatically detect it. You can learn how on this guide.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.