If you are using our previous version of embedded checkout, please refer to the old multiple NFT purchases guide
You can enable users to purchase multiple NFTs in a single transaction using either CrossmintEmbeddedCheckout or CrossmintPayButton:
<CrossmintProvider apiKey="_YOUR_CLIENT_API_KEY_">
  <CrossmintHostedCheckout
    lineItems={[
      {
        collectionLocator: "crossmint:_YOUR_COLLECTION_ID_",
        callData: {
          totalPrice: "0.001",
          _quantity: 1, // matches your contract's parameter name
        }
      },
      {
        collectionLocator: "crossmint:_YOUR_COLLECTION_ID_",
        callData: {
          totalPrice: "0.002", 
          _quantity: 2,
        }
      }
    ]}
  />
</CrossmintProvider>
For external EVM contracts registered in Crossmint Console, ensure the attribute name in callData matches the parameter name in your mint function. For example: If your mint function has the signature: mintTo(address _to, uint256 _amount) then use _amount instead of quantity. See our Register External Collection guide for details on registering your contract.
All line items must use the same collectionLocator and be on the same blockchain.

FAQ