Product update webhook gets deleted automatically after few days

khaledhasan
New Member
1 0 0

We have created a product webhook in one of our shopify stores and in our backend we are sending back 200 OK response as soon as the webhook hits our API endpoint. 
The issue is even if it works but for some strange reason Shopify is deleting our webhook from the stores after couple of days automatically. It is causing issue and inconvenience as we have to check it manually and also have to create the webhook when it gets deleted. 

Any help will be highly appreciated. Thanks in advance.

/**
 * POST Product update
 *
 * @param {Request} req
 * @param {Response} res
 */
router.post('/update', async (req: Request, res: Response) => {

  res.status(200).send('Received Product Update Data');

  try {
   ...
  .
  .
  .
  ...

 

0 Likes
james-langille
Shopify Staff
Shopify Staff
39 8 9

Hello @khaledhasan,

Sending back a 200 OK is the right thing for your app to be doing when it receives webhooks. However, I'm wondering if there might be issues at the network-level trying to connect to your application in the first place (such as a timeout?)... Could you help me by telling me some more information such as the error(s) you are seeing (if any), your store id, and the details of the subscription you've created?

james-langille | Developer @ 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 Shopify.dev or the Shopify Web Design and Development Blog

0 Likes