Node: redirect after post webhook

Shopify Partner
18 0 2

How can i redirect user to a specific page after getting webhook data?


This doesn't work:'/webhooks/customers/create', webhook, (ctx) => {

   /* handle customers create */
  console.log('received webhook: ', ctx.state.webhook);
if ( == '') {
ctx.status = 301;


Reply 1 (1)

Shopify Staff
1561 81 341

Webhook requests are made from our back end to communicate resource changes to your back end. There won't be a user attached to these requests, so the redirect would only serve to have our back end interpret the 300 range status as a failed delivery, prompting a retry. You're expected to always return to webhook requests with a 200 range request to imply a successful delivery.



Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog