Setup Requirements
The Crossmint hooks must be used within components wrapped by bothCrossmintProvider and CrossmintCheckoutProvider:
useCrossmintCheckout
TheuseCrossmintCheckout hook provides access to the checkout state and allows you to build custom UI experiences.
Return Values
Order Phases
The order can be in one of the following phases:quote- Initial phase where price quotes are being generatedpayment- Payment is being processeddelivery- NFTs are being delivered to the recipientcompleted- Order has been successfully completed
For more information on the order lifecycle, see our Order Lifecycle
guide.
For more information on the order object, see our Order
Properties section.
Complete Example
A custom checkout experience that renders your own status UI next to the embedded component:Best Practices
- Provider Setup: Always ensure components using hooks are wrapped with both required providers
- Error Handling: Handle undefined states when accessing
orderproperties - Loading States: Provide appropriate loading UI while the order state is initializing
- Type Safety: Take advantage of TypeScript support for better development experience
Next Steps
Track Orders
Poll order status or receive webhook events
Handle Errors
Surface payment and delivery failures to buyers

