How to properly respond to Shopify Webhook in React/Next.js & Node

3 0 1

Hello all,


I leveraged the React & Node tutorial to get started with building my first Shopify app. I'm currently subscribed to the ORDERS_PAID Webhook & since I see that the Webhook is being sent more than one time for a single order, I'm clearly not responding to it properly.


As you can see from my code below, I'm using the Koa-router & @Shopify/koa-shopify-webhooks NPM modules. Does anyone know how to properly respond? Both ctx.status = 200 & ctx.res.statusCode = 200 did not stop the Webhook from being sent more than once. 


Thanks & Stay Safe!


KJ GarrettScreen Shot 2020-05-07 at 18.41.35.pngScreen Shot 2020-05-07 at 18.42.26.png

Replies 3 (3)

3 0 1

I think I solved the issue with: 

ctx.response.status = 200;

Please let me know if anyone has any awesome resources on Next.js or Node's Koa Framework outside of their respective documentation.



Shopify Partner
13 2 3

Have you implemented webhooks for GDPR complaint ? I saw that we don't need to register 

How you have tested it ? how you verified request is from shopify ? 

20 1 2

What would be the PHP equivalent of this?