Why the orders-api sends multiple versions for the same webhooks simultaneously?

We are handling our online orders with a 3rd party system due to the complexity of the process. But when we use the Create, Update and Fulfillment webhooks we get multiple Versions, up to Version 6, 7 and 8 some times, and multiple versions arrive exactly at the same time without having done anything in the order. And even the Create webhook arrives after Updates webhooks. We are trying to use the Fulfillment webhook only to avoid that many duplicated webhooks but that one also send 2 or 3 versions simultaneously. Why Square has to send all those Versions for these webhooks and on top of it do it at the same time? Is there a way to get only 1 version for the webhooks update and fulfillment?

The next sequence of webhooks were received all at 5:04pm simultaneously for the order_id 3m4QU8Mp2hu6vJFvhA0A3LTeTUdZY :

 Webhook  |  Arrived at  |   square-initial-delivery-timestamp   |  lb_request_id

order.fulfillment.updated version 1 | Wed, 16 Nov 2022 5:04:49 PM -0500 | 2022-11-16T22:04:44Z | bfeff20f833b9e45db018239ecb5f2d3
order.created version 1 | Wed, 16 Nov 2022 5:04:51 PM -0500 | 2022-11-16T22:04:43Z | 7cebbc76fc7343f1afa563f6d212626d
order.fulfillment.updated version 3 | Wed, 16 Nov 2022 5:04:53 PM -0500 | 2022-11-16T22:04:47Z | 876bc7f2be83480e1bb1f701b0c80339
order.updated version 3 | Wed, 16 Nov 2022 5:04:53 PM -0500 | 2022-11-16T22:04:48Z | 7173b2634c09f31a30c08870114f67c1
order.created version 1 | Wed, 16 Nov 2022 5:04:53 PM -0500 | 2022-11-16T22:04:43Z | 371c39166c17bdbe48dec90fdf1e474e
order.fulfillment.updated version 1 | Wed, 16 Nov 2022 5:04:53 PM -0500 | 2022-11-16T22:04:44Z | 9eddc943142fd45aacf69ec29b4abde9
order.updated version 4 | Wed, 16 Nov 2022 5:04:55 PM -0500 | 2022-11-16T22:04:49Z | 9932fb87e1bd3f8168027d6b3dd0521a
order.updated version 4 | Wed, 16 Nov 2022 5:04:55 PM -0500 | 2022-11-16T22:04:49Z | 9932fb87e1bd3f8168027d6b3dd0521a
order.updated version 2 | Wed, 16 Nov 2022 5:04:55 PM -0500 | 2022-11-16T22:04:48Z | b982e32ba19e8fb02cfe2502c5e945f9
order.updated version 3 | Wed, 16 Nov 2022 5:04:58 PM -0500 | 2022-11-16T22:04:48Z | 0ae22fec03a96c6652633c213035d33b

order.create version 1 was received twice,
order.updated version 1 was missing,
order.updated version 2 received once,
order.updated version 3 received twice,
order.updated version 4 received twice,
fulfillment.updated version 1 was received twice,
fulfillment.updated version 2 was missing,
fulfillment.updated version 3 was received once

The problem is that our 3rd party system is creating duplicated orders because even with a unique id setup in place, those webhooks arriving exactly a the same time get 2 and 3 duplicated orders created simultaneously. There is nothing we can do because there is no time for 1 webhook to check if the other already arrived because all come a the same time exactly.

Why are we receiving the same webhook version multiple times? and even multiple versions also at the same time?

Square Webhooks have the following SLA for event notifications:

  • In most cases, event notifications arrive in well under 60 seconds of the associated event.

  • There is no guarantee of the delivery order of event notices.

This behavior is expected and we recommend that your application implement some form of deduplication method to help avoid your application creating duplicate actions based on events received. :slightly_smiling_face:

Hi @Bryan-Square, we saw before that order.create, order.update and fulfillment.update were sent simultaneously, and that’s ok… we know what to do with each one… but the problem is that you are sending the same webhook and same version exactly at the same time. It must be a glitch. I mean, why to send order.create version 1 twice? and exactly at the same time? no system can handle that because getting both at the same time and having the same information trigger the same process twice. We are prepared for multiple webhooks and different versions arriving at the same time, but this is about receiving exactly the same webhook and exactly the same version exactly at the same time… and it happens only with some webhooks, not with all… isn’t that wrong?

Do you have some example events and what’s the application ID? Also are you subscribed to the same events in another application? That would definitely cause duplicates. :slightly_smiling_face: