I'm developing a Shopify app that sets up a "product/create" Webhook through the Shopify API.
While the Webhook is sending a POST to the correct address with no problem, it seems that it is not supplying the ID of the shop that the product has been created for. This is a problem because I need to store metadata for the shop and its products. I need to ensure that the link exists in my database between the shop and its products.
Is there a way to either:
Find the shop ID for the product which is being given to me through the Webhook
Configure the Webhook with custom data that is handed back when the webhook sends its request, so that I can force it to hand back the shop ID when I create it
Thanks in advance!
When Shopify sends request to your webhook url. it will also send some extra details in HTTP header.
You can find X-Shopify-Shop-Domain header which will contain domain name of
store. From domain name you can extract name of store.
it also contains X-Shopify-Hmac-SHA256 to verify aunthenticity of request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With