skip to Main Content

I have created shopify app in which I have used webhooks for checkout/update. Webhook is working fine but I am getting this error message.

Your webhook for checkouts/update
at https://www.smsblitz.io/smsblitz/abondoned?shop=smsblitz.myshopify.com&user=iman%5Egemconsultinginc.org is
failing to return a successful response.This webhook has been
attempted 23 times. If your webhook continues to fail, it will be
removed and your application will not receive any more notifications.

Please help me to solve this issue.

Thanks

2

Answers


  1. Your webhook is not working fine. It is failing to respond to Shopify. So until you fix that, Shopify is counting the failures and letting you know, that soon, they will just stop that Webhook, and you’ll have to recreate it.

    To solve the issue, POST a webhook to your endpoint and verify it returns a 200 OK.

    Login or Signup to reply.
  2. Initially I had the same problems. Following things could be taken care for getting out of the above issue.

    • Do not wait till you process the data in the notification. Soon after you get the webhook data, send back a 200 ok status code and then go further processing.
    • Make sure there is no white space before php tag or there is no echo statement available before you send the 200 status code to shopify because that will end up with error – header already sent.
    • Do not sleep with a timer as shopify wait for a 5 second time window and expect your 200 status code in between that time span.
    • You can save your processed data/id in a database. Shopify sends a webhook notification around 19(they say but sometimes more in real) times. So, you can try with first check with your database that the webhook notification is already processed by you or not. If processed send a 200 OK immediately.

    Webhooks created through API are more reliable than the one created manually through the Shopify admin. (Though shopify claims they treat them same.)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search