# Square Online order's line item has catalog\_tax\_id on invalid field

**URL:** <https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [September 30, 2021, 6:11pm UTC](https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798 "2021-09-30T18:11:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maciej](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Maciej](https://developer.squareup.com/forums/u/Maciej)\
**Post date:** [September 30, 2021, 6:11pm UTC](https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798/1 "2021-09-30T18:11:34Z")

</div>

Hi,

Sorry but bothering you so often, but there are still some things that I don’t understand. Please, let’s look at this [order](https://jsoneditoronline.org/#left=cloud.23af0e8f6f634a4485b50a9ae53e0a01). It seems to be created by Square Online but there is a line item with id `nH2P0qJL6m560LYciM3zwC` that has associated tax with **tax\_uid** `ND3JARBK7BABTMLTNKJ5OK5T`, which is exactly **the same** as the tax id taken from the catalogue, but actually, there is no `catalog_object_id` on the line item’s `applied_taxes` level.

Could you please explain why there is no `catalog_object_id` if the line item’s tax refers to the catalogue tax? I’ll appreciate any response you can provide.

Thanks!

---

<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:** [October 1, 2021, 3:36pm UTC](https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798/2 "2021-10-01T15:36:42Z")

</div>

According to the team this is the legacy way of creating taxes on line items in which the `applied_tax` field is automatically generated, and the UID will match the referenced tax UID. This is due to they way the order was created with the Square Online Store. 🙂

---

<div class="post-metadata">

**Author:** ![Maciej](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Maciej](https://developer.squareup.com/forums/u/Maciej)\
**Post date:** [October 4, 2021, 3:57pm UTC](https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798/3 "2021-10-04T15:57:22Z")

</div>

Hi Bryan,

To confirm, did you mean that an `applied_tax` has a `tax_uid` field directly related to the `uid` field on order’s `taxes` (relation shown using the green arrow)?  
If yes, what about the tax from the catalogue? Its `id` is exactly the same as `uid` of the tax from the `taxes` (red arrow relation). I think it can’t be a coincidence. And it wouldn’t be weird if this relation was created by the `catalog_object_id` on the `taxes` field as usual - especially when the sale source is **Square Online**.  
Isn’t this a thing directly managed by you? Or by saying, “_This is due to the way the order was created with the Square Online Store_” you mean that one day you were doing this in such a peculiar way? So, instead of storing an `id` of catalogue tax on the `catalog_object_id` field, you were just sharing the identifier when those objects were related?

 ![item_doesnt_have_tax_catalog_id](https://global.discourse-cdn.com/square/original/1X/65cb4182ace0ddf556cc5fa344709445d79dbfe7.png)

Please confirm. I will be so much thankful.

Thanks.

---

<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:** [October 4, 2021, 4:39pm UTC](https://developer.squareup.com/forums/t/square-online-orders-line-item-has-catalog-tax-id-on-invalid-field/3798/4 "2021-10-04T16:39:29Z")

</div>

Yes, that is correct. The `applied_tax` does have a `tax_uid` that relates to the `uid` of the order’s tax. In this case the `uid` matches the `catalog_object_id` for the tax due to the Square Online Store application that created this order. This is managed by us and this order was created on a previous version of the API when orders were created this way. I’ve shared this with the team however you should expect that some tax `uid` will match the `catalog_object_id` of the tax in the catalog. 🙂
