Why should I send line items?

Line items are a way for you to communicate more details about the items in your order.  We always recommend sending in line_items if it is possible.  Please read the entire article to learn how to properly send line_items with your requests.

Line items can include the following:

  • id: a unique id created by you
  • quantity: how many of this item are included in this order
  • product_tax_code: use this code to associate this item with a particular category of items
  • unit_price: the price of one of this item
  • discount: the total discount for this collection of items - not based upon the unit
  • sales_tax(on calls to /v2/transactions/*): the amount of sales tax for this item - not based upon the unit

Product Tax Codes with Line Items

By passing in line items, you are able to use product_tax_codes to communicate to TaxJar what type of products are included in an order. Our system is then able to dynamically determine the rate and tax exempt status for the item relative to the ship to location of the order and apply it. TaxJar will also use this information when building your state reports.

Sales tax with Line Items

When sending an order into TaxJar using /v2/transactions/order, if you include line_items in your request you will want to list out the sales tax per line item. When sending in line_items with sales tax, you will also want to send in the sales_tax parameter at the request level. The the sales_tax parameter at the request level should include the sum of the line_items' sales tax + any sales tax from shipping. 

If you include line_items but do not include sales_tax at the line_item level, our system will attribute all the sales tax to shipping.

Line Items vs Amount

In calls to /v2/taxes:

If you include line_items in a call to /v2/taxes, our system will use the line items to calculate the sales tax and ignore the amount parameter. You need to send either line_items or an amount.

In calls to /v2/transactions/*:

If you include line_items in a call to /v2/transactions/* the total from the line_items must be included in the amount parameter. The amount parameter is the line_item total + shipping.