question

kevin2078 avatar image
kevin2078 asked kevin2078 commented

adding tax to custom item

I was following the instructions on creating a simple order here:

https://docs.clover.com/build/working...

I was able to get an order created and a line item inserted but no tax shows up when I open the item in the orders application.

In the setup application under taxes I created one tax rate with the default check box checked.

10 |2000

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

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered kevin2078 commented

You have to add tax rates to line items yourself. It's up to you to add "default" tax rates to line items you create.

4 comments
10 |2000

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

kevin2078 avatar image kevin2078 commented ·

Is there a sample of how to do this? I created an order using the register application and then used api calls to get the order and could not see a difference between the order I created using api calls and the register application. But of course the register application works as expected. I'm guessing the register app doesn't use the standard api or must be calling something extra I am not able to see using the v3 api.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Register uses only our public SDK. Pretty hard to say since you haven't posted any code nor said specifically what's not working in your code. You said "I was able to get an order created and a line item inserted but no tax shows up when I open the item in the orders application.", are you saying you added a line item using OrderConnector.addLineItem(), and you passed tax rates in the call, and the resulting order has no taxes?

0 Likes 0 ·
kevin2078 avatar image kevin2078 commented ·

Sorry for not being clear enough. Let me try again.

I was using the Web API calls and not OrderConnector class.

After creating and order I sent a POST to add a line item https://sandbox.dev.clover.com/v3/mer...

{ "name" : "Test Line Item", "price" : 500, "unitQty" : 1000, "unitName" : "each", "note" : "", "printed" : false, "exchanged" : false, "refunded" : false, "isRevenue" : true, "taxRates" : [{ "id" : "S8KDDH62HNV54" } ] }

I receive "Invalid line item". If I remove taxRates the item will get inserted but no taxes get applied when opened in the Orders

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

I suspect you need to include the entire tax rate object not just the ID. Can you try that?

0 Likes 0 ·

Welcome to the
Clover Developer Community