Onchain Commerce Template
An Onchain Commerce Template build with OnchainKit, and ready to be deployed to Vercel. Play with it live on https://onchain-commerce-template.vercel.app/ Have fun! ⛵️Setup
To ensure all components work seamlessly, set the following environment variables in your.env file using .local.env.example as a reference.
You can find the API key on the Coinbase Developer Portal’s OnchainKit page. If you don’t have an account, you will need to create one.
You can find your Coinbase Commerce API key on Coinbase Commerce. If you don’t have an account, you will need to create one.
Enabling checkout
By default, the checkout functionality is disabled to prevent transactions in non-production environments. To enable the checkout flow for local development, you need to uncomment certain lines of code in theOnchainStoreCart.tsx component, along with the imports at the top of the file.
You can also remove the OnchainStoreModal component and logic as well as the MockCheckoutButton as these were created for demo purposes only.
Next, you’ll want to replace products in the OnchainStoreProvider with your own product items.
After these changes, the actual OnchainKit checkout flow will be functional in your local environment.