shopify webhooks not firing in production

I made a private app using shopify-api-node package which is working perfect in local development using ngrok. I registered a webhook "products/update" which is working fine.

registered url local: https://example.ngrok.io/webhooks/product-update

but the same webhook registered with production environment, webhook is not getting fired

registered url in production: https://custom.example.in/webhooks/product-update

When both local and production servers are running, webhooks are fired to local server (tunneled via ngrok) only.

I am using nginx in production as a reverse proxy. I have checked access.log file of nginx but there is no webhook request fired by shopify. I tried creating a new private app but no help.

What can be possible issue? Thanks in advance.


Solution 1:

Some common problems are:

  • An invalid SSL certificate, e.g. one that is self-signed or one that is missing intermediate certificates. You can check for problems using https://www.ssllabs.com/ssltest/
  • Your server or app is not configured to accept POST requests, instead it only accepts other methods. From the command line you could check this by making a POST request with curl to your webhook endpoint.
  • Your app has implemented webhook verification logic and you are trying to verify production webhooks using your development app secret.
  • The webhook that you created has been cancelled because Shopify was not receiving a 200 status response quickly enough. You can use the Webhooks API to list webhooks and verify that yours is still registered.