brendo234
brendo234

Reputation: 385

BigCommerce webhooks not firing + view an active list

I'm currently developing with a test store - I'm not sure if that has any relevance.

After successfully creating a webhook (response to being created below), I have been unable to get it to fire.

{
  "id": 13300,
  "client_id": "d8xgoreoa4qggw30lx7v0locfxoqna7",
  "store_hash": "vh2s7g3i",
  "scope": "store/order/statusUpdated",
  "destination": "https://www.[HIDDEN].com/bigcommerce-api/webhooks/",
  "headers": null,
  "is_active": true,
  "created_at": 1424993422,
  "updated_at": 1424993422
}

Questions:

  1. Is it possible to list all active webhooks from within the store management area? EDIT: I am able to request an active list of webhooks through the API, I am curious if it is possible to see these same active hooks within the store management area.
  2. Is it possible to force a webhook to fire? Because updating order status does not seem to be making calls to my destination URL.

Upvotes: 2

Views: 930

Answers (1)

J Z
J Z

Reputation: 315

To address your questions:

  1. It is not possible to see a list of all active webhooks from within the Control Panel. You can only see that via the API and you can only see webhooks which you created with your API access token and client ID. Other apps installed to the same store who register their own hooks are segregated from yours.
  2. Updating the status of an order is forcing the webhook to fire as the event occurred. There is not a way to trigger the webhook to fire without causing the event tied to the scope of the webhook.

If you are not receiving these webhooks the most likely issues are either the SSL installed at your destination URL is missing Intermediate CAs, or, that your servers are not properly configured for an SNI enabled request.

What to do to test:

Start with the "Troubleshooting" steps seen at the bottom of this page: https://developer.bigcommerce.com/api/webhooks-getting-started

You can run a test on your domain at the SSL check site mentioned to confirm you have all of your Intermediate CAs and no other obvious errors. Assuming all that checks out the next thing to look at is your server configuration. If you are using a virtual server then you need to make sure that your server is properly configured to accept an SNI protocol message and respond with the proper SSL for your destination URL hostname.

The process of configuring an Apache server to work properly with SNI is as seen here: https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI

This process will differ by server type but generally you need to make sure your vhost configuration is setup properly for your destination URL if you are running a virtual hosted setup. If your server is not setup to use the SNI protocol and is configured incorrectly so your hostname is not in the vhost configuration file (or default SSL config file), then you will not be able to receive webhooks.

If your server is not a virtual server then you just need to confirm that your default SSL configuration file is including your destination URL hostname as part of the default SSL config.

If a request to your destination URL is met with an SSL that does not match your domain in the initial SSL handshake, then the request will not go through.

Let me know if you are still having problems after looking into the above and we will see what else we can test.

Upvotes: 1

Related Questions