Tax Lines in Order Module

In this document, you’ll learn about tax lines in an order.

What are Tax Lines?#

A tax line indicates the tax rate of a line item or a shipping method.

The OrderLineItemTaxLine data model represents a line item’s tax line, and the OrderShippingMethodTaxLine data model represents a shipping method’s tax line.

A diagram showcasing the relation between orders, items and shipping methods, and tax lines


Tax Inclusivity#

By default, the tax amount is calculated by taking the tax rate from the line item or shipping method’s amount and then adding it to the item/method’s subtotal.

However, line items and shipping methods have an is_tax_inclusive property that, when enabled, indicates that the item or method’s price already includes taxes.

So, instead of calculating the tax rate and adding it to the item/method’s subtotal, it’s calculated as part of the subtotal.

NoteThe following diagram is a simplified showcase of how a subtotal is calculated from the tax perspective.

A diagram showcasing how a subtotal is calculated from the tax perspective

For example, if a line item's amount is 5000, the tax rate is 10, and is_tax_inclusive is enabled, the tax amount is 10% of 5000, which is 500. The item's unit price becomes 4500.

Was this page helpful?
Edit this page