This is happening for one of my merchants. When she updates her catalog or location, 2 notifications are sent to the respective webhook. Instead of just 1. The event_ids are different so I don’t think I can use idempotency.
Could the seller have two applications sending webhook events? That’s the only other time I’ve seen events being sent twice. Also what’s your application Id?
When you mean 2 applications, do you mean that there was some kind of bug that caused her account to register for my application twice? Or 2 different applications? If the 2nd application isn’t mine I don’t see why the design decision would be to send me the other app’s notification to my webhook’s URL.
My application ID is: sq0idp-n7Co30IXghyF_BPiBvCnBA
Looking at the logs I’m seeing that we are resending the webhook because of a failed delivery. I’m seeing up to 9 retries for some events. Is your application responding with a 2xx within 10 seconds?
I had some non-2xx’s before. I fixed that issue and I was still seeing the problem, but now it seems to be only sending 1 notification! I will monitor it and if it comes up again I’ll send the time of the notifications. Thank you!
@Bryan-Square Ok, yes it is still doing it. Check out the catalog update webhook notification for the time at 2022-02-09T19:22:58.007191+00:00 AND there was a 2nd one at 2022-02-09T19:22:58.463058+00:00 . Instead of just 1. Both were the response to the the same catalog tax update I did to the merchant.
(These times are from my server logs so they will be both a bit later than your Square logs I’d think)
This is Ashish with HomeTechGeeks. We are seeing the same behavior in our applications. Is there a way to disable retry? We are processing the notifications in a serverless lambda hence cannot guarantee the time it takes to respond to the notifications.
Currently, there isn’t the ability to disable retries. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.
For anyone in a similar positon. We updated our logic to push the message to SQS FIFO queue and return 200 immediately to process the message from the SQS queue. We also have deduplication enabled hence if the message is received twice, the SQS queue ignores it.