Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

VegaDev
Visitor
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

Replies 3 (3)

james-langille
Shopify Staff (Retired)
70 15 28

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?

To learn more visit the Shopify Help Center or the Community Blog.

OvertureWeb
Visitor
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())

 

OvertureWeb
Visitor
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...
}