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

Solved
Highlighted
Excursionist
17 2 2

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

0 Likes

Success.

Excursionist
17 2 2

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.

0 Likes
Tourist
10 1 3

The real MVP.

 

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

1 Like