question

ihor avatar image
ihor asked ihor commented

Tax for items as sum, not rate

Hi,

Do I have any possibility to add tax to order items not in percentage representation (TaxRates) but in money amount representation? The third party service that we are using for integrating with Clover operates with money amount taxes.

Thanks.

Orders
1 comment
10 |2000

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

Dan avatar image Dan ♦ commented ·

changed to answer

0 Likes 0 ·
Dan avatar image
Dan answered ihor commented

No, currently only support percentage based taxes. More tax support is planned, but not in the immediate future.

1 comment
10 |2000

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

ihor avatar image ihor commented ·

Thank you for your response.

0 Likes 0 ·
ihor avatar image
ihor answered

I have another question. Should I use only registered in Merchant settings tax rates or can create dynamically for each line item in the order?

Also, I've try to add taxes by executing next code:

List<TaxRate> taxRates = mInventoryConnector.getTaxRates();
LineItem lineItem = new LineItem();
lineItem.setTaxRates(taxRates);
lineItem.setName("Test Item");
lineItem.setPrice(100L);
lineItem.setUnitQty(1)
mOrderConnector.addCustomLineItem(orderToPay.getId(), lineItem, true);

Unfortunately, this code raises com.clover.sdk.v1.ClientException: status code: 400 cannot update one or more of these fields: LineItem{json='{"taxRates":{"elements":[]},"unitQty":1,"price":100,"name":"Test Item"}', bundle=null, changeLog=null} (In example tax rate list is empty, but even if it with one or more tax rates - the raised exception the same). But if remove adding tax rates for item, code works fine.

Looking forward to hearing from you.

10 |2000

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