Updated 12 August 2020 | Anastasia Kholod

API2Cart always takes care of maintaining the integrations. In particular, thanks to API2Cart webhooks you won’t longer need to constantly poll the API to discover whether any changes happened.

Recently we have updated the way API2Cart webhooks handle a loss of store connection.

In case API2Cart loses connection with a store due to any changes on the customer side (e.g. bridge deleted, store key changed, etc.), you will get the callback notification with the empty body and additional headers:

  • X-Webhook-Error-Code - error code, other than 0.
  • X-Webhook-Error-Reason - issue report (e.g. ‘incorrect store key’).
  • X-Webhook-Error-Message - instruction on how to solve the issue and what will happen if the issue will not be solved.
  • X-Webhook-Error-Try-Count - the number shows how many tries left before we disable the webhook.

If the connection between API2Cart and the store is lost, the request interval will increase accordingly to the number of failed attempts to connect.

After five failed requests, the webhook will be disabled.

To activate this webhook, change the parameter to active using webhook.update method (see details of webhook parameters here).

How to use API2Cart webhooks

We have developed 6 methods to manage API2Cart Webhooks for six shopping carts: Shopify, Magento, WooCommerce BigCommerce, OpenCart, and PrestaShop. With their help, you can get the list of available webhooks, as well as create, delete, update and count them.

You can learn more about the webhook methods and try them out on the dedicated documentation page. Also, read the instruction on how to set up API2Cart Webhooks.

If you're not sure how to use webhooks to upgrade your service and would like some guidance from us,  just contact us by pressing the button below.

Related Articles


What are Webhooks and How Do They Work?
How to Easily Track Changes for Orders, Customers, Products
You Asked, We Heard: 10 Amazing April 2019 Product Updates