# Why do I get multiple order.updates/OPEN for a single order?

**URL:** <https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [April 22, 2023, 6:48pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277 "2023-04-22T18:48:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![square8](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@square8](https://developer.squareup.com/forums/u/square8)\
**Post date:** [April 22, 2023, 6:48pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/1 "2023-04-22T18:48:25Z")

</div>

When I run through checkout, I get up to 6 duplicate (with different version) order.updated / state=OPEN events through webhooks. How do I prevent this?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 24, 2023, 4:07pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/2 "2023-04-24T16:07:33Z")

</div>

An `order.updated` event will only trigger if the orders been updated. There are instances where multiple events will fire but they shouldn’t bee the same events. Do you have an example `order_id` where multiple events fired? 🙂

---

<div class="post-metadata">

**Author:** ![square8](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@square8](https://developer.squareup.com/forums/u/square8)\
**Post date:** [April 24, 2023, 4:27pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/3 "2023-04-24T16:27:50Z")

</div>

Hey @Bryan-Square,

Sure. For example: kVnpsAnseCeHTxaz26YDutfEUfUZY

---

<div class="post-metadata">

**Author:** ![square8](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@square8](https://developer.squareup.com/forums/u/square8)\
**Post date:** [April 24, 2023, 4:29pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/4 "2023-04-24T16:29:43Z")

</div>

I should add that the checkout is quite slow. I’m generating a link with the code below (for my single item). In my tests, I’m applying a coupon and then checking out with Google Pay. Something about this causes 6 order.updated events to fire.

```auto
            val items = client.catalogApi.searchCatalogObjects(
                SearchCatalogObjectsRequest.Builder()
                    .objectTypes(listOf("ITEM"))
                    .build())
            val item = items.objects.first()

            val lineItem = OrderLineItem.Builder("1")
                .catalogObjectId(item.itemData.variations.first().id)
                .build()
            val link = checkoutApi.createPaymentLink(
                CreatePaymentLinkRequest.Builder()
                    .order(Order.Builder(configuration.square.location)
                        .lineItems(listOf(lineItem)).build())
                    .prePopulatedData(PrePopulatedData(email, null, null))
                    .build()
            )
  
            return link.paymentLink

```

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 24, 2023, 5:41pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/5 "2023-04-24T17:41:07Z")

</div>

This is the expected behavior. Currently the entire order isn’t returned in the webhook event. Each version of the order will have some difference from the previous version. Since all the events that you got have a unique version this means that there not duplicates but unique versions of the order. 🙂

---

<div class="post-metadata">

**Author:** ![square8](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@square8](https://developer.squareup.com/forums/u/square8)\
**Post date:** [April 24, 2023, 5:52pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/6 "2023-04-24T17:52:28Z")

</div>

I don’t get it. Can you explain further? Each is identical except for the version.

Why are 6 versions generated?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 24, 2023, 6:00pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/7 "2023-04-24T18:00:43Z")

</div>

That’s correct, each is the same except the version of the webhook. If your application calls [RetrieveOrder](https://developer.squareup.com/reference/square/orders-api/retrieve-order) with the `order_id` to get the entire order object for each version you’ll see the fields that have updated. 🙂

---

<div class="post-metadata">

**Author:** ![square8](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@square8](https://developer.squareup.com/forums/u/square8)\
**Post date:** [April 24, 2023, 6:02pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/8 "2023-04-24T18:02:54Z")

</div>

Can you help me understand why this happens though? It seems weird to send 6 events saying “order is open”.

Is there a better webhook to listen to in order to kick off order fulfillment?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [April 24, 2023, 6:15pm UTC](https://developer.squareup.com/forums/t/why-do-i-get-multiple-order-updates-open-for-a-single-order/9277/9 "2023-04-24T18:15:49Z")

</div>

The order items, totals, taxes, discounts, and fees are being calculated or updated which are triggering events. We give a response when an order is created as fast as possible but there are some asynchronous calculations that happen on our servers that update an order which in turn triggers update events. This is why your seeing multiple `order.updated` events. 🙂
