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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

In webhook order/create, how do we identify from which store the order has come from?

Solved

In webhook order/create, how do we identify from which store the order has come from?

abhinavp00719
Shopify Partner
28 2 22

I cannot find any field in order/create webhook JSON data which tells which shop created the order.

Founder Descrii Description Generator
Accepted Solution (1)

abhinavp00719
Shopify Partner
28 2 22

This is an accepted solution.

After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification contains a JSON payload, and HTTP headers that provide context. For example, the orders/create webhook includes the following headers:

 

  • X-Shopify-Topic: orders/create
  • X-Shopify-Hmac-Sha256: XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
  • X-Shopify-Shop-Domain: johns-apparel.myshopify.com
  • X-Shopify-API-Version: 2019-04

Some HTTP headers are particularly useful for your app. For example, X-Shopify-Hmac-Sha256 is used to verify webhooks, and X-Shopify-Shop-Domain is used to identify the store that's associated with them.

Founder Descrii Description Generator

View solution in original post

Replies 2 (2)

abhinavp00719
Shopify Partner
28 2 22

This is an accepted solution.

After you configure a webhook subscription, the events that you specified will trigger a webhook notification each time they occur. This notification contains a JSON payload, and HTTP headers that provide context. For example, the orders/create webhook includes the following headers:

 

  • X-Shopify-Topic: orders/create
  • X-Shopify-Hmac-Sha256: XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM=
  • X-Shopify-Shop-Domain: johns-apparel.myshopify.com
  • X-Shopify-API-Version: 2019-04

Some HTTP headers are particularly useful for your app. For example, X-Shopify-Hmac-Sha256 is used to verify webhooks, and X-Shopify-Shop-Domain is used to identify the store that's associated with them.

Founder Descrii Description Generator
LukeG
Shopify Partner
21 1 16

The real MVP.

 

Coming back to answer his own question. *thumbs up*