> ## Documentation Index
> Fetch the complete documentation index at: https://zenskar.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Concepts: How tax rates work

> This document explains how the tax rates of a business entity decide the tax that the Zenskar tax engine applies: the jurisdiction of each tax rate, its rate changes over time, and their tax components.

## Tax rates

> [accordion] Walkthroughs
>
> You can start with a walkthrough instead of reading this document first. A walkthrough is the practical extension of the concepts in this document. It puts them into practice through one example with concrete values. Each part of the walkthrough explains the concepts that its steps apply and links to the sections that cover them.
>
> | Walkthrough | What it shows |
> | - | - |
> | [End-to-end walkthrough: How tax configuration works](https://zenskar.com/docs/20260301/zenskar-modules/settings/tax-configuration/walkthroughs/tax-configuration.md) | This example-based document shows how your billing team sets up tax for customers in San Francisco with the Zenskar tax engine. |

> [accordion] Map of concepts
>
> | Concept | What it is | What it is used for |
> | - | - | - |
> | [Tax rate](#tax-rates-what-the-zenskar-tax-engine-applies) | The percentage of tax that the Zenskar tax engine applies to one tax category in one jurisdiction | It decides the percentage of tax for a tax category, in a served country that uses the Zenskar tax engine. |
> | [Jurisdiction](#jurisdictions-where-a-tax-rate-applies) | The geographic area that a tax rate covers | Zenskar matches it against the default billing address of the customer, to decide which tax rate applies. |
> | [Rate change](#rate-changes-tax-rates-over-time) | One dated period of a tax rate, with its own tax components, that applies from its start date until its end date, or with no end date | It decides the percentage of a tax rate on each date. |
> | [Tax component](#tax-components-the-parts-of-a-rate-change) | One named tax within a rate change, with its own percentage | The tax components of a rate change are added together to give the percentage that the rate change applies. |

> [accordion] Related modules
>
> Tax rates use the following modules:
>
> | Module | Details |
> | - | - |
> | [Business entity](https://zenskar.com/docs/20260301/zenskar-modules/settings/business-entity.md) | Each business entity defines its own tax rates. |
>
> The following modules use tax rates:
>
> | Module | Details |
> | - | - |
> | [Contracts](https://zenskar.com/docs/20260301/zenskar-modules/contracts/concepts/contracts.md#contracts-what-you-agree-with-a-customer) | A contract uses the tax rates of the business entity of its customer, when its served country uses the Zenskar tax engine. |
> | Invoices | Zenskar calculates the tax of an invoice with the tax rates of the business entity. |

## Tax rates: what the Zenskar tax engine applies

A **tax rate** is the percentage of tax that the Zenskar [tax engine](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#tax-engine) applies to one [tax category](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#tax-category) in one [jurisdiction](#jurisdictions-where-a-tax-rate-applies).

Each [business entity](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#business-entity) defines its own tax rates. The percentage of a tax rate can change over time, through its [rate changes](#rate-changes-tax-rates-over-time).

With the Zenskar tax engine, you maintain every tax rate. Zenskar applies only the tax rates that you add. A third-party tax engine uses its own rates and rules instead.

A tax rate takes effect only in a [served country](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#served-country) that uses the Zenskar tax engine.

The following example shows how one business entity taxes the tax category `SaaS subscription` in three served countries. The business entity uses the Zenskar tax engine in Australia and India, and [Avalara AvaTax](https://zenskar.com/docs/20260301/third-party-integrations/tax-automation/avalara-avatax/concepts.md) in the United States:

| Served country | Tax engine | What the tax engine uses for `SaaS subscription` | What decides the percentage |
| - | - | - | - |
| Australia | Zenskar tax engine | The tax rate for `SaaS subscription` that [matches the address of the customer](#how-zenskar-matches-a-jurisdiction) | The tax rate that you add: 10% |
| India | Zenskar tax engine | The tax rate for `SaaS subscription` that matches the address of the customer | The tax rate that you add: 18% |
| United States | Avalara AvaTax | The [Avalara tax code](https://zenskar.com/docs/20260301/zenskar-modules/settings/glossary.md#avalara-tax-code) of `SaaS subscription`, such as `SW054000` | The rates and rules of Avalara AvaTax, for the address of the customer |

With the Zenskar tax engine, the same tax category can have its own tax rate in each jurisdiction. In the United States, the business entity needs no tax rate for `SaaS subscription`, because Avalara AvaTax decides the percentage.

## Jurisdictions: where a tax rate applies

A **jurisdiction** is the geographic area that a tax rate covers.

A jurisdiction is a country, and optionally a state, a city, and a ZIP-code range within it. A city needs a state. A ZIP-code range can have a state and a city, but does not need them. The level of a jurisdiction is its most specific part: country, state, city, or ZIP code. For example, the jurisdiction `US`, `CA`, `San Francisco` is at the city level.

### How Zenskar matches a jurisdiction

When Zenskar activates or bills a [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract), it matches the tax rates of the business entity against the default billing address of the customer. Zenskar starts at the most specific level of the address, and moves up one level at a time until a tax rate matches:

| Level | A tax rate matches when |
| - | - |
| ZIP code | The address has a ZIP code, and the ZIP-code range of the tax rate contains it. The state and the city of the tax rate do not matter. |
| City | The address has a city and a state, and the tax rate is at the city level with the same city and state. |
| State | The address has a state, and the tax rate is at the state level with the same state. |
| Country | The tax rate is at the country level. |

On each date, Zenskar uses the first level that matches, and ignores the levels above it. Zenskar does not add the tax rates of different levels together. The percentage of a more specific tax rate is therefore the total of its own tax and the taxes of the levels above it.

A tax rate covers only the dates of its rate changes. On a date that the matching tax rate does not cover, Zenskar moves up to the next level. See [Example: tax rates at two levels over time](#example-tax-rates-at-two-levels-over-time).

A ZIP-code range matches only ZIP codes with the same number of characters. For an address in the United States, Zenskar also tries the first five digits of a ZIP+4 code. For example, `94105-1234` matches the range `94105` to `94107`.

Zenskar compares the state and the city as text, without regard to capitals. A state name does not match a state code. For example, `California` does not match `CA`.

> [!WARNING]
>
> A tax rate whose state or city is written differently from the address does not match. An address without a ZIP code, a city, or a state matches only the levels that it has. In both cases, Zenskar uses a less specific tax rate, when one matches, without a message. Write the state and the city of each tax rate as the addresses of your customers write them. Fill in every part of the default billing address of each customer.

At each level, at most one tax rate of a tax category matches an address on a given date. For example, two tax rates whose ZIP-code ranges both contain `94105` cannot share a date.

#### Example: which tax rate applies to each address

A business entity serves the United States with the Zenskar tax engine. It has the following tax rates for one tax category, and no country-level tax rate:

| Tax rate | Jurisdiction | Level | Taxes in its percentage | Percentage |
| - | - | - | - | - |
| 1 | `US`, `CA` | State | State tax: 6% | 6% |
| 2 | `US`, `CA`, `San Francisco` | City | State tax: 6%, city tax: 2.5% | 8.5% |
| 3 | `US`, `CA`, `San Francisco`, `94105` to `94107` | ZIP code | State tax: 6%, city tax: 2.5%, ZIP-code tax: 0.5% | 9% |

Tax rate 3 replaces tax rates 1 and 2 for the ZIP codes that it contains.

| Default billing address of the customer | Level that Zenskar matches | Result |
| - | - | - |
| `CA`, `San Francisco`, `94105` | ZIP code: tax rate 3 | 9% |
| `CA`, `San Francisco`, `94105-1234` | ZIP code: tax rate 3, through the first five digits | 9% |
| `CA`, `San Francisco`, `94110` | City: no tax rate contains `94110`, so Zenskar moves up to tax rate 2 | 8.5% |
| `CA`, `San Francisco`, no ZIP code | City: tax rate 2 | 8.5% |
| `ca`, `san francisco`, no ZIP code | City: tax rate 2, because capitals do not matter | 8.5% |
| `CA`, no city, no ZIP code | State: tax rate 1 | 6% |
| `California`, `San Francisco`, no ZIP code | None: `California` does not match `CA`, and no country-level tax rate exists | No tax rate |
| No state, `San Francisco`, no ZIP code | None: without a state, Zenskar skips the city level, and no country-level tax rate exists | No tax rate |

## Rate changes: tax rates over time

A **rate change** is one dated period of a tax rate, with its own [tax components](#tax-components-the-parts-of-a-rate-change), that applies from its start date until its end date, or with no end date.

A tax rate has one or more rate changes. The rate changes of a tax rate cannot overlap or share a day, so at most one of them is in effect on each date. A rate change with no end date covers every later date, so a later rate change would overlap it.

### Rate changes in billing

For each [billing period](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#billing-period) of a [contract](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#contract), Zenskar uses the rate change in effect on one date of the billing period. The date depends on the [payment timing](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#payment-timing) of the [line item](https://zenskar.com/docs/20260301/zenskar-modules/contracts/glossary.md#line-item):

| Payment timing | Date that Zenskar uses |
| - | - |
| Prepaid | The first day of the billing period |
| Postpaid | The last day of the billing period |

Zenskar does not split a billing period across two rate changes. A new rate change therefore applies from the first billing period whose date falls on or after its start date.

For the tax category of each [product](https://zenskar.com/docs/20260301/zenskar-modules/products/glossary.md#product) of a contract, every date of the contract needs a rate change of a matching tax rate. Without one, you cannot activate the contract.

Zenskar keeps every rate change after its end date. An invoice for a past billing period, such as the first invoice of a contract that starts in the past, uses the rate change that was in effect then.

### Example: one tax rate over three years

A business entity has a tax rate for the tax category `SaaS subscription` in one jurisdiction. The tax rate has three rate changes:

| Rate change | Tax components | Start date | End date |
| - | - | - | - |
| 1 | GST 9% | January 1, 2025 | December 31, 2025 |
| 2 | GST 10% | January 1, 2026 | June 30, 2027 |
| 3 | GST 11% | July 1, 2027 | None |

Each rate change ends on the day before the next one starts, so no two rate changes share a day. On March 1, 2027, rate change 2 is in effect, rate change 1 has ended, and rate change 3 has not started.

The following monthly billing periods show which rate change Zenskar uses for each:

| Billing period | Payment timing | Date that Zenskar uses | Rate change | Percentage |
| - | - | - | - | - |
| June 2027 | Prepaid | June 1, 2027 | 2 | 10% |
| June 2027 | Postpaid | June 30, 2027 | 2 | 10% |
| July 2027 | Prepaid | July 1, 2027 | 3 | 11% |
| March 2025, invoiced in 2027 | Prepaid | March 1, 2025 | 1 | 9% |

The last row uses rate change 1, which ended in 2025.

A quarterly billing period from June 1 to August 31, 2027 includes July 1, 2027, when rate change 3 starts. The following table shows which rate change Zenskar uses for that billing period:

| Billing period | Payment timing | Date that Zenskar uses | Rate change | Percentage for the whole billing period |
| - | - | - | - | - |
| June 1 to August 31, 2027 | Prepaid | June 1, 2027 | 2 | 10% |
| June 1 to August 31, 2027 | Postpaid | August 31, 2027 | 3 | 11% |

Zenskar applies one rate change to the whole billing period, even though rate change 3 starts within it.

### Example: tax rates at two levels over time

A business entity has two tax rates for the tax category `SaaS subscription`:

| Tax rate | Jurisdiction | Level | Rate change |
| - | - | - | - |
| 1 | `US`, `CA` | State | 6%, from January 1, 2025, with no end date |
| 2 | `US`, `CA`, `San Francisco` | City | 8.5%, from January 1, 2027, with no end date |

A customer in San Francisco has a contract that starts on July 1, 2026, with monthly prepaid billing periods. For each billing period, Zenskar uses the first day:

| Billing periods | Tax rate 2 has a rate change on the first day | Tax rate that Zenskar uses | Percentage |
| - | - | - | - |
| July 2026 to December 2026 | No | Tax rate 1, at the state level | 6% |
| January 2027 onward | Yes | Tax rate 2, at the city level | 8.5% |

Tax rate 2 matches the address from the start of the contract, but it has no rate change before January 1, 2027. Until then, Zenskar moves up to tax rate 1. From January 1, 2027, tax rate 2 replaces tax rate 1.

## Tax components: the parts of a rate change

A **tax component** is one named tax within a rate change, with its own percentage.

A rate change has one or more tax components. Each tax component has a name, such as `GST`, that is unique within its rate change.

The Zenskar tax engine adds the tax components of a rate change together. It applies no tax other than those tax components. Each tax component applies to the amount before tax. For example, a rate change with `CGST` at 9% and `SGST` at 9% applies 18%.

Tax components let one tax rate hold every tax that applies in its jurisdiction. In the [example of matching jurisdictions](#example-which-tax-rate-applies-to-each-address), each tax of a tax rate is a tax component. For example, tax rate 3 has three tax components: a state tax, a city tax, and a ZIP-code tax.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.