Webhook processed, returned status code 200

Webhook processed, returned status code 200

Girish_Rajwani
Shopify Partner
87 3 8

Hi Guys,

 

In Shopify node template, i am getting Webhook processed, returned status code 200

whenever webhooks are executed. 

My question is from where it's coming and how can i modify it ? 

I want to modify app uninstall & shop redact so that i can delete data and return 200.

 

Any help would be really appreciated 🙂

 

Thanks. 

 

Girish | Shopify Expert  
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - My Shopify Apps: App Store | Looking for a solution to a problem in your store? Send me an email

Replies 2 (2)

Aliza915
Visitor
2 0 0

Hi,

The status code 200 you mentioned indicates a successful response to the webhook request. In Shopify, webhooks are triggered events that send data from your store to a specified endpoint (URL) when certain events occur, such as app uninstall or shop redact.

To modify the behavior of the app uninstall and shop redact webhooks, you'll need to handle these events in your server-side code that receives the webhook requests. Depending on the programming language and framework you're using, the implementation may vary. However, the general steps are as follows:

  1. Identify the specific webhook event for app uninstall or shop redact in your code. These events will have a specific name or topic associated with them.
  2. Implement the necessary logic to handle the event. This may involve deleting data associated with the uninstalled app or shop redact, as per your requirements.
  3. Return a response with the status code 200 to Shopify to acknowledge that the webhook was processed successfully.

By customizing the webhook handling code, you can perform actions specific to your application, such as deleting data or performing additional operations. Make sure to consult Shopify's documentation for the specific webhook events you're interested in and their payload structure.

If you provide more details about your specific programming language and framework, I can provide a more specific example or guide you further.

Girish_Rajwani
Shopify Partner
87 3 8

Hey @Aliza915 

 

thanks for reply. i am using node.JS and i am stuck on where to execute code and return response.

 

1. There is already app uninstalled hook defined and returning response in shopify node template but not able to find where it is. 

2. in GDPR.js if i am defining app uninstalled hook , then it is giving me multiple webhook error but in GDPR how can i verify HMAC & return response ? there is no req, res object

3. currently 

app.post(shopify.config.webhooks.path, shopify.processWebhooks({ webhookHandlers: GDPRWebhookHandlers })) => this is the code .
if i modify this, for example,
app.post(shopify.config.webhooks.path, async (req, res) =>  { // My code } ), 
in above i am not getting data in request object.
 
more how to define & differentiate endpoints for all webhooks ?
 
sorry for many queries 🙂
 
Thanks in advance 

Girish | Shopify Expert  
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - My Shopify Apps: App Store | Looking for a solution to a problem in your store? Send me an email