Skip to main content

Tax Zone

The TaxZone object defines the taxation rules applicable to a product based on the destination country. It is the fundamental entity that allows webround.com to correctly calculate VAT (or other sales taxes) for every single item in the cart.

TaxZone Definition

PropertyTypeDescription
idstring (UUID)Unique identifier for the tax rule.
countryCodestringISO country code (e.g., IT, FR) to which the rate applies.
ratenumberThe tax rate percentage (e.g., 22 for Italian VAT).
isDefaultbooleanIf true, it indicates this is the default rate for the product when a destination has not yet been defined.

Use in the Fiscal Engine

Tax Zones represent the list of all locations configured for the correct application of the tax rate. The system uses them to ensure regulatory compliance during checkout:

  1. Tax Mapping: Each product can have different rates depending on the country (e.g., 22% in Italy, 20% in France).
  2. Dynamic Calculation: As soon as the user specifies the shipping country, the system filters the taxZones array to find the corresponding countryCode and updates the item's gross total.
  3. Gateway Integration: This data is essential for correctly communicating tax amounts to payment providers like Stripe, ensuring that generated invoices are valid.

Object Example

{
"id": "84f26098-4823-4f3c-82d0-44733e4d9d5d",
"countryCode": "IT",
"rate": 22,
"isDefault": true
}

VAT Exemption

If the user's profile has the property vatExempt: true (as in the case of intra-EU Business purchases), the calculation engine will ignore the rate value provided by the Tax Zone to zero out the tax.