How do I send 200 response to shopify webhook using koa.js.

Highlighted
Tourist
10 0 1

I receive the webhook but Shopify thinks it failed.

Here is my code

 

```

router.post("/webhooks/customers/create", webhook, async (ctx) => {
console.log("received state: ", ctx.state.webhook);
 
ctx.response.status = 200;
return;
});
```
I also tried,
// ctx.res.statusCode = 200;
// ctx.res.write("OK");
// ctx.res.end();
0 Likes
Highlighted
Shopify Partner
1689 207 339

Use ctx.status = 200;  you can also omit the return.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes