Hi!
It’s only happened once so far, on the first production webhook I received, but I’ve seen its happened a couple times on the forum.
Square sent me 2 (likely identical) webhook notifications as received by my server:
**.**.**.154 - - [[03/Oct/2024:11:07:17 +0930]] 204 -
**.**.**.154 - - [[03/Oct/2024:11:07:17 +0930]] 204 -
Square however only shows 1 event:
Event ID: 5b4fb681-e123-3d59-80a3-684f90bcf79a
Triggered at: 2024-10-03 11:07:16 GMT+9:30
Sent at: 2024-10-03 11:07:16 GMT+9:30
My application forwarded these notifications onto another service where there were duplicate entries dated:
03-Oct-2024 01:37:18.411
03-Oct-2024 01:37:18.368
I don’t know if it was a retry from Square, but they were both within a second.
It shouldn’t cause an issue in the future as I’ve worked around it.
Just wondering if someone could explain why I may have received 2 notifications.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Use Webhooks to Integrate with a Payroll System
Refunds API Webhooks
Handle Inventory Event Notifications
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The duplicate webhook notifications you received could be due to a network issue or a temporary glitch on Square’s end. However, Square’s system is designed to ensure that each webhook event is delivered exactly once. If your endpoint doesn’t acknowledge receipt of the notification with a 200 HTTP status code within 10 seconds, Square may attempt to deliver the notification again.
In your case, it seems like both notifications were acknowledged with a 204 status code, which might indicate that they were indeed duplicates. It’s good that you’ve implemented a workaround to handle such scenarios. If this issue persists, it might be worth reaching out to Square’s Developer Support for further investigation.
This answer was reviewed by @Bryan-Square.
1 Like