user826323
user826323

Reputation: 2338

shopify webhook - identify a different client

I would like to integrate my backend API with several shopify clients by using webhook created by shopify.

I read that webhook is a push notification triggered by shopify. If I give my server endpoint (receiving order/creating a new customer) to my several shopify clients, how will I identify a different notification?

Will there be a unique identifier(per client) in the notification sent by shopify? It's because if I receive an order notification, I need to identify this order notification with one of my clients in my db.

Please advise me about this use case.

Thanks.

Upvotes: 2

Views: 253

Answers (2)

Marcus Schappi
Marcus Schappi

Reputation: 341

Per the Shopify Webhook Documentation, each webhook from Shopify contains a JSON payload and HTTP headers that provide context.

The X-Shopify-Shop-Domain HTTP header includes the domain of the shop, e.g., johns-apparel.myshopify.com. You can use this to identify the shop.

Upvotes: 1

David Lazar
David Lazar

Reputation: 11425

Every Webhook comes to you from Shopify with security information that allows you to determine if the incoming Webhook is even valid and every Webhook also tells you the shop the Webhook is coming from.

So you can use the shop information to figure things out. Straightforward!

Upvotes: 1

Related Questions