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.

orders/create event not firing

orders/create event not firing

tadmit
Shopify Partner
3 0 1
I used the npm init @Shopify/app@latest command to create a Shopify app and attempted to implement a feature that listens for webhooks triggered whenever a new order is created in the shop.

Thus, I navigate to the shopify.server.js file and include the following code within the webhooks property:

ORDERS_CREATE: {
  deliveryMethod: DeliveryMethod.Http,
  callbackUrl: "/webhooks",
  callback: async (topic, shop, body, webhookId) => {
    console.log("--- Order create ---");
    const payload = JSON.parse(body);
    console.log(payload);
    console.log("--- /Order create ---");
  },
},

And ofcourse, I added to this access scopes inside shopify.app.toml:

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "write_products,read_orders,write_orders"

When I update a product (have a webhook set up for PRODUCTS_UPDATE), I can see the webhook being successfully invoked. However, when I manually create an order in the orders tab of the dashboard, I do not see any corresponding webhook requests. What could be the issue, and how can I address it?


store test link: https://admin.shopify.com/store/tzionhamuztzim
i go to orders => create order => add product => mark as paid => create order. and nothing!

Replies 2 (2)

Liam
Community Manager
3108 344 899

Hi Tadmit,

 

Are you still seeing this issue?

Liam | Developer Advocate @ 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

tadmit
Shopify Partner
3 0 1

yes it's still relevant.
orders webhooks not fired, while product update yes.
do i need to do something else? or this configuration is correct?
what access scope needs to be set for orders_create webhook? and what the process should i do to simulate real event? go to admin and create order via dashboard is valid proess?