Channel Setup for Non-Catalyst Frameworks
B2B Edition’s Buyer Portal can be used with headless storefronts created using a third-party solution, such as WordPress or Next.js. This allows you to extend B2B Edition’s front-end buyer tools to multiple headless storefronts, while managing your back-end processes from the BigCommerce control panel.
Follow the instructions in this article to set up a headless storefront channel that uses the default, hosted version of the Buyer Portal. If you want to deploy a locally-developed custom Buyer Portal to your headless channel, see the Headless Guide in the b2b-buyer-portal repository.
These instructions are for enabling B2B Edition on non-Catalyst headless frameworks. See B2B Edition for Catalyst-specific considerations.
Prepare
You will need to create two API tokens for your BigCommerce store. They have different permissions required, so please pay attention to which one is used for the step you are working on. Refer to this support article for more information on how to create API Accounts.
-
Create a token (TOKEN_A) with modify permissions for the following resources:
- Channel listings
- Channel settings
- Sites & routes
-
Create a token (TOKEN_B) with modify permissions for the following resources:
- Carts
- Storefront API tokens
- Storefront API customer impersonation tokens
Tokens are created using the API path https://{storehash}.mybigcommerce.com/manage/settings/api-account.
Also check that you have multi-storefront feature enabled and available seats.
Create the channel
Send a request to the Create a channel endpoint using TOKEN_A to create a channel for your headless platform. Note the channel ID returned in the response; you’ll use it in successive steps.
Generate an impersonation token
Generate an impersonation token by using the next cURL as base and using TOKEN_B.
Create a site for the channel
Create the site for the channel, using TOKEN_A.
