# Applying multiple preset taxes when upserting a new product

**URL:** <https://developer.squareup.com/forums/t/applying-multiple-preset-taxes-when-upserting-a-new-product/20359>\
**Category:** Questions\
**Tags:** catalog-api\
**Created:** [December 29, 2024, 10:27pm UTC](https://developer.squareup.com/forums/t/applying-multiple-preset-taxes-when-upserting-a-new-product/20359 "2024-12-29T22:27:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CapeGlass](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@CapeGlass](https://developer.squareup.com/forums/u/CapeGlass)\
**Post date:** [December 29, 2024, 10:27pm UTC](https://developer.squareup.com/forums/t/applying-multiple-preset-taxes-when-upserting-a-new-product/20359/1 "2024-12-29T22:27:58Z")

</div>

Hello,  
We set up a number of sales taxes via the web for the different states we have stores in. Now I need to upload all of the products. I thought there would be a way to tie these sales taxes on an item by item basis but I do not see any.

Basically I need a way to say when uploading an item what sales taxes to apply at checkout. So for example clothes don’t have any taxes but shoes over a certain price do have them. So if they have tax I need to be able to tie more than one of these pre configured tax rates to the item.

I see that there is this in the documentation

```auto
$tax_data = new \Square\Models\CatalogTax();
$tax_data->setName('Sales Tax');
$tax_data->setCalculationPhase('TAX_SUBTOTAL_PHASE');
$tax_data->setInclusionType('ADDITIVE');
$tax_data->setPercentage('5.0');
$tax_data->setAppliesToCustomAmounts(true);
$tax_data->setEnabled(true);

```

This seems to manually set the sales tax per item which is not ideal but if my only option can I add multiple of these objects to each item and say when to use them.

Or is there a way to apply the taxes we set up in the dashboard to each item then tie those same taxes to the different locations.

Thanks  
Don

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 29, 2024, 10:28pm UTC](https://developer.squareup.com/forums/t/applying-multiple-preset-taxes-when-upserting-a-new-product/20359/2 "2024-12-29T22:28:20Z")

</div>

👋 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:

> **[Apply Catalog Taxes to Orders](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts/auto-apply-taxes)**
>
> Learn how to apply preconfigured taxes to an order using the Orders API.

> **[Apply Taxes, Discounts, and Service Charges](https://developer.squareup.com/docs/orders-api/apply-taxes-and-discounts)**
>
> Learn how to apply taxes and discount to an order's price calculation when using the Square Orders API.

> **Additional Documentation**
>
> [Design a Catalog](https://developer.squareup.com/docs/catalog-api/design-a-catalog)  
> [Catalog API](https://developer.squareup.com/docs/catalog-api/what-it-does)  
> [https://developer.squareup.com/docs/squarebridge/business-central/onboard](https://developer.squareup.com/docs/squarebridge/business-central/onboard)

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.

---

<div class="post-metadata">

**Author:** ![Square-Dev-AI](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/square-dev-ai/32/2513_2.png) [@Square-Dev-AI](https://developer.squareup.com/forums/u/Square-Dev-AI)\
**Post date:** [December 30, 2024, 6:37pm UTC](https://developer.squareup.com/forums/t/applying-multiple-preset-taxes-when-upserting-a-new-product/20359/3 "2024-12-30T18:37:00Z")

</div>

You can apply preconfigured taxes to your catalog items using the Orders API. First, you need to create a CatalogTax object for each tax rate you want to apply. Then, you can use the Catalog API’s BatchUpsertCatalogObjects endpoint to create your catalog items and associate them with the appropriate CatalogTax objects.

When creating a CatalogItem object, you can specify the tax\_ids field to automatically apply preconfigured taxes to that item. The tax\_ids field should contain the IDs of the CatalogTax objects you want to apply. This way, when an order is created for that item, the specified taxes will be automatically applied.

If you want to remove or block certain taxes from being applied to specific line items in an order, you can use the UpdateOrder endpoint. This allows you to specify fields\_to\_clear to remove specific taxes from specific line items.

Remember, the tax settings are applied at the order level, so they will apply to all line items in the order unless specifically blocked.

_This answer was reviewed by @Bryan-Square._
