Learn how to migrate to the latest version, V3, of Crossmint’s Pay Button
<CrossmintHostedCheckout />
component with React Context providers<CrossmintPayButton />
component@crossmint/client-sdk-react-ui@1.12.0
and above. Make sure to update
your dependencies to the latest version.CrossmintPayButton
to CrossmintHostedCheckout
to better reflect its purpose and capabilities. This component now supports multiple line items, advanced payment methods, and enhanced UI customization.
CrossmintProvider
handles API authentication and environment setup using a client-side API key (more details in Step 1), while CrossmintCheckoutProvider
manages order state and checkout flow.
projectId
and environment
are no longer neededlineItems
, an array of items that support both collectionLocator
(for primary sales with formats "crossmint:${collectionId}"
or ${chain}:${contractAddress}
) and tokenLocator
(for secondary sales with the format ${chain}:${contractAddress}:${tokenId}
). Each item includes callData
that takes the same object previously passed to mintConfig
- see our Item Selection guide for detailed examplesuiConfig
with appearance
- see our UI Customization guidequantity
parameters and mintConfig
arrays, Pay Button V3 introduces a more intuitive lineItems
approach for checking out multiple items at once from the same collection for primary sales. Each line item can have different quantities and prices, with individual delivery status tracking:
orders.create
scope enabled. More info on creating API keys here.
1.12.0
or above..env.local
file or Vercel configuration):
projectId
and environment
values are now automatically derived from the client-side API key.