Out now! Check out the Poll results: Do you have a Shopify store?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Webhook keeps getting deleted

Webhook keeps getting deleted

bpatters
Visitor
1 0 0

Our webhook for orders keeps getting deleted.

The sdk documentation says to return a 200 ok in order for the webhook to keep working, and I think we are. Our webservice that receives the json from the webhook post is a python flask application.

 

Here is my python return statement

return make_response('200 Ok', 200)

 

Is this correct? I have tried every variation of return of a 200 response and it keeps getting deleted.

Any help would be great

thanks

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 522

Hey @bpatters, 

Any webhook will be deleted after 19 consecutive retries, which is generally an indicator that an app's server isn't responding, responding with the expected reply (200), or not replying quick enough. Below are a few of the current resources we provide as an overview, a setup guide, and for troubleshoot webhooks:
 

  • Our configuration insights from the webhooks best practices doc are a good starting point for conceptualization.
  • There is an a extensive setup guide available for the three (3) configuration types offered (HTTPS, Pub/Sub, EventBridge). 
  • The troubleshooting resource covers investigations steps for multiple scenarios, such as troubleshooting deleted subscriptions. 
     

Based on the post it sounds like this might be specific to the framework you are using to build your app. While I'm not a Python developer and won't be able to assist with any code, searching online I was able to find a few examples of basic webhook servers built in Flask. That said, if the app server/configuration can't handle volume or reply with the expected response as quickly as the required < 5s , instead consider using either of the other config options (Google Cloud Pub/Sub or Amazon EventBridge) - more info here. 
 

Lastly, we would suggest keeping an eye on the community in the case that others have insights, or you choose to share updates and solutions here down the road - Best
 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

pardumanrana
Shopify Partner
1 0 0

I am also facing the same issue , I am using google apps script & my webhook is also getting deleted, I contacted the shopify support but they still couldn't reach to a soultion, I think it's a major problem with shopify webhook function