question

oussama avatar image
oussama asked David Marginian Deactivated answered

no tax rates are being applied on atomic orders

i want to apply a tax rate to lineItems when creating an atomic order, but the tax is never being applied to the item, and in the response, the taxRates elements name is always NO_TAX_APPLIED, even tho the taxRemoved attribute is false,

i tried applying an existing taxRate or providing the taxAmount and rate only, but the tax is never being applied.

here is an example of my request

{ "orderCart" : {
"lineItems" : [
{
"item" : {
"id" : "V6FKW2V836N8G"
},
"unitQty" : 1 ,
"modifications" : [
{
"modifier" : {
"available" : "true" ,
"price" : "0"
},
"id" : "1"
}
],
"isRevenue" : "false" ,
"taxRates" : [
{
"id" : "SHA7037E01PN2" ,
"name" : "taxTest" ,
"rate" : 0 ,
"taxAmount" : 50
}
],
"name" : "prodtext"
}
],
"groupLineItems" : false
}
}

and here is the response of the taxRate section for every lineItem

"taxRates" : {
"elements" : [
{
"id" : "KVW96AGP1SKMW" ,
"lineItemRef" : {
"id" : "TMDSS5754G3PW"
},
"name" : "NO_TAX_APPLIED" ,
"rate" : 0 ,
"isDefault" : false
}
]
}

i would very much appreciate the help on why i can't apply a tax, thank you

OrdersLineItemsTaxes
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered

To get the taxes added, you have to add the rate. If the rate is zero then it will have NO_TAX_APPLIED. For an example of a 6% tax:

"taxRates": [

{

"id": "SHA7037E01PN2",

"name": "taxTest",

"rate": 600000,

}

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered

The atomic order endpoints work off of Clover inventory. The inventory item needs to have the correct tax associated, there is no way to override or set tax rates per item via the request (regardless of what the docs say). If you need to override tax rates, as Bryan mentioned you need to create the tax rate and use the bulk_line_items endpoint.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community