I'm unable to add a custom line item to an order with a tax rate via the REST API. (I'm using an updated version of the Python client)
I'm adding the line item on the 'create line item' endpoint:
/v3/merchants/{mId}/orders/{orderId}/line_items
Adding the line item itself with a name and price works, but as soon as I add a taxRate, the line item will not add to the order. No error messages or anything, just no lineitem.
{ "name": "Test", "price": 200, "taxRates": { "id": "631XWCHXCJXMG", "name": "California Sales Tax", "rate": 797500, "isDefault": True } }
Other things I've tried with no effect:
- Adding the line item, then updating it with the taxRate
- Creating the line item with/without the 'defaultTaxRates' flag included, with/without the taxRate
- Updating the line item with/without the 'defaultTaxRates' flag included, with/without the taxRate
The documentation (https://docs.clover.com/clover-platform/docs/working-with-orders#section-creating-an-order) does not indicate how to add a tax rate to a custom line item at all.
Other answers here on the forum seem to indicate that including the taxRate as I'm doing above is the correct way, but doing so is not creating a line item at all. This is a valid taxRate in our Clover account. What am I missing here?