Webhook payload missing

andreioniga
New Member
1 0 0

Hey there,


On our existing website, we sell access tokens to online games that we're building. I've done this by setting up a Shopify store and using the Buy Button functionality. Once an order goes through, the intended outcome is to send the customer a newly generated, unique access token.

For this to work, I've set a webhook up from the admin panel of Shopify store. The callback of this webhook is a URL bound to the website where we sell. To test the webhook, I'm logging incoming requests. Both the headers and the payload, if any. The problem is that every test notification I send from the admin panel, apparently reaches the callback URL with an empty payload. No POST data, no GET data. Only the headers.

To further test this, I've also done a few dummy transactions, using their Bogus payment provider. But it's exactly the same: the only things that get logged are the headers. There's no payload.

What gives? What am I missing?

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 134

Hi @andreioniga ,

 

All webhook notifications coming from Shopify should contain the payloads in the body of the request. I would check your website to make sure you are properly receiving the webhook notifications from Shopify and correctly reading the payload from the body of the request. I would also verify to make sure from the HMAC headers that the webhook notifications you are receiving are indeed coming from Shopify. 

 

Here a helpful guide on how to use NodeJS and Ruby to verify webhook notifications and print the payload data from the request body to the console: https://medium.com/@scottdixon/verifying-shopify-webhooks-with-nodejs-express-ac7845c9e40a

https://medium.com/@kei178/how-to-use-shopify-webhooks-in-rails-78c252a50a1b

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes