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

Highlighted
New Member
3 0 0

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

0 Likes
Highlighted
New Member
3 0 0

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.

 

Thanks!

0 Likes
Highlighted
New Member
3 0 0

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

/shop/redact
/customers/data_request
/customers/redact
 
How you have tested it ? how you verified request is from shopify ? 


0 Likes