Specify which items to purchase with Hosted Checkout
The Hosted Checkout (Pay Button) allows you to specify which items your users can purchase using the lineItems
property. This guide explains how to configure item selection for different asset types.
Crossmint supports purchasing various types of digital and physical assets:
Digital Assets
Physical Products
All items available for purchase must comply with Crossmint's terms of service and legal requirements. Non-Fungible Collections and Fungible tokens must be reviewed and approved by Crossmint before being available in production.
You'll use one of these locator formats in your lineItems
:
collectionLocator - For minting new tokens:
crossmint:<_YOUR_COLLECTION_ID_>
- For collections created in Crossmint Console (e.g. crossmint:9c82ef99-617f-497d-9abb-fd355291681b
)crossmint:<_YOUR_COLLECTION_ID_>:<_TEMPLATE_ID_>
- For collections created in Crossmint Console where a specific NFT template is desired (e.g. crossmint:9c82ef99-617f-497d-9abb-fd355291681b:silver-pass
)<blockchain>:<contract-address>
- Using direct contract addresses for external collections registered in Crossmint Console (e.g. ethereum:0x71c7656ec7ab88b098defb751b7401b5f6d897).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.
The buyerCreatorRoyaltyPercent
parameter controls how much of the creator royalty percentage the buyer pays when purchasing Solana NFTs through marketplaces.
Marketplace Requirements:
Parameter Details:
Automatic 100% Enforcement: The system automatically overrides this parameter to 100% when:
getAssetProof()
returns valid proof dataYou can enable users to purchase multiple items in a single transaction by providing an array of line items:
Multiple Item Limitations:
The Pay Button cannot use webhooks for order status tracking because it operates in a separate window. Therefore, you’ll need to implement polling to check order status through alternative methods. See the Order Status Guide for more information on tracking order completion in pay button.