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
| Property | Type | Description |
|---|---|---|
| id | string (UUID) | Unique identifier for the tax rule. |
| countryCode | string | ISO country code (e.g., IT, FR) to which the rate applies. |
| rate | number | The tax rate percentage (e.g., 22 for Italian VAT). |
| isDefault | boolean | If 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:
- Tax Mapping: Each product can have different rates depending on the country (e.g., 22% in Italy, 20% in France).
- Dynamic Calculation: As soon as the user specifies the shipping country, the system filters the
taxZonesarray to find the correspondingcountryCodeand updates the item's gross total. - 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.