Commerce Layer API, explained — Explore our Data Model.
Payments

Tax Calculation

Taxes will be added to an order total or only reflected in the order summary depending on if the line item price includes the tax already. In this section, you will learn about tax calculation, rules associated with manual calculators, and tax categories.
Tax Calculator, Tax Rule, and Tax Category resources and their relationships.

Tax calculators

Taxes will be automatically calculated at checkout. If the price list associated with a market does not include taxes, the tax will be added to the order total, and customers will be charged. If the price list associated with a market includes taxes, the tax will only be reflected in the order summary. Tax calculators use the merchant's address and the shipping address to determine the order's tax rate.

An organization may have one or more tax calculators. Users can connect a tax calculator to a market. All the taxes for orders in a market will be calculated automatically. Commerce Layer currently supports TaxJar, Avalara, and Manual Tax Calculator. On top of that, it offers the possibility to implement any particular custom tax calculation logic leveraging external tax calculators. A user will have to define tax rules for their calculator with the tax rules list if a manual calculator is used. Third-party tax calculators (TaxJar and Avalara) already provide tax rules by default.

Tax categories

Tax categories are defined for all SKUs that have special taxation. They are used by all tax calculators to determine any reduced tax rate for SKUs.

Tax rules

Tax rules are associated with manual calculators. They allow users to define matching rules to be used with matching shipping addresses. Unlike third-party tax calculators, which provide tax rules by default, users will have to associate tax rules with their calculators manually. The tax rule list allows users to configure manual calculators based on the shipping address.

Users will define matching rules to be used with the matching shipping address. The tax rules are applied to markets based on the specified shipping address. Users can use regular expressions to filter shipping addresses by country, state code, and zip code. The tax rule eligible for tax calculation is filtered by matching the order shipping method with the defined regular expressions.

Ready to get started?