Skip to main content
Version: 2.x

Webhooks

Setting up Front-Commerce

You need to setup the webhook secret within your Front-Commerce app with the FRONT_COMMERCE_BIG_COMMERCE_WEBHOOK_SECRET environment variable.

ProTip™

Create a random secret by running openssl rand -hex 25 in your terminal.

Setting up BigCommerce

We will now create webhooks for the following scopes:

  • catalog/*
  • products/*
  • sku/*

We first need to setup Authentication for your BigCommerce account (you can refer to the documentation).

We will need to create the webhook api to get an Access Token and the Store Hash

  1. Navigate to your BigCommerce account and click on the Settings tab, scroll down and open API > API accounts.

  2. Click on the + Create API Account button.

  3. Copy the API path as it contains the Store Hash.

    https://store-yhowbpps2e.mybigcommerce.com/manage/settings/api-accounts
  4. Create a new webhook with read-only access on the following scopes

    • Content
    • Products
    • Customers
    • Information & settings
    • Marketing
    • Orders
    • Get payment methods
    • Carts
    • Checkouts
    • Sites & routes
  5. Save the API account, and copy the Access Token. (see figure below)

    https://store-yhowbpps2e.mybigcommerce.com/manage/settings/api-accounts

You are now ready to get started with your webhooks, we have created a BigCommerce Webhook API in postman to simplify this process, you can hit the Run in Postman button and simply replace all the relevant variables to get started creating your webhooks.

Creating a webhook

You can refer to the Create folder in the BigCommerce Webhook API, to create the correct webhooks.

Important

All listed webhooks are required for cache invalidation.

Updating a webhook

To update a webhook, you first need to run the GET ALL WEBHOOKS api to get an array of webhooks. You can then replace the WEBHOOK_ID variable with the id of the webhook that you want to remove. Once that has been done you can Create a new webhook with the new settings.