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 LineItemTaxLine
data model represents a line item’s tax line, and the ShippingMethodTaxLine
data model represents a shipping method’s tax line.
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 added to the item/method’s subtotal.
However, line items and shipping methods have an is_tax_inclusive
attribute 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.
The following diagram is a simplified showcase of how a subtotal is calculated from the tax perspective.