Test webhook doesn't send when these webhooks are related to orders

VegaDev
New Member
1 0 1

Hello, I'm building a private app for shopify and I'm using webhooks. I register my webhooks threw the admin dashboard.

I'm using ngrok to test them on localhost. When I fire test webhook like "updated cart" everything works well, I can receive the test webhook but, when I'm trying to do some test with 'Order paid' then I don't receive any test webhook even if the dashboard says 'test webhook sent'.

The weird thing is that I don't receive any order related test webhook but it works when I test update cart. So I don't think that it is a problem that I caused.

 

I also tried to downgrade my API version from 2021-01 to 2020-10

james-langille
Shopify Staff
Shopify Staff
57 12 15

Hello @VegaDev , welcome to the community!

I tried testing out the 'send test webhook' in my test store on both API versions (2020-10 and 2021-01) using ngrok, and was able to receive the test notification in both cases.

Are you sure that:

  • Your ngrok hasn't expired
  • Your URL to deliver the webhook to includes the path to the correct endpoint? ngrok takes care of routing the hostname only, so if you want it to call something on https://<my-server>:<my-port>/<my-endpoint> you'll need to use https://<ngrok-host>/<my-endopint> in order to do so. Does that make sense?

james-langille | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
OvertureWeb
New Member
2 0 0

One other thing to verify is that your server is listening for POST requests, I'm using ExpressJS in my example:

app.post('/', (req, res) => {
console.log(express.json())

 

0 Likes
OvertureWeb
New Member
2 0 0

One other thing to verify is that your server is listening for POST requests not just get requests

app.post('/', (req, res) => {
console.log(express.json())
// your implementation here...
}

 

0 Likes