TaxRule
Tax application rules defining when and how a tax applies. Specifies conditions for tax applicability based on products, services, customer types, amounts, and locations.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| tax | Tax | stored | Reference to the Tax entity | Required |
| priority | number | stored | Priority order for tax rule evaluation (lower number = higher priority) Example: | Optional |
| taxScope | string | enum | What this tax applies to Values: Example: | Optional |
| productCategories | string[] | stored | List of product categories this tax applies to (empty = all) Example: | Optional |
| customerTypes | string[] | stored | Customer types this tax applies to (B2C, B2B, government, etc.) Example: | Optional |
| minimumAmount | MonetaryAmount | stored | Minimum transaction amount for tax to apply | Optional |
| maximumAmount | MonetaryAmount | stored | Maximum tax amount cap | Optional |
| postalCodeFrom | string | stored | Starting postal code for range-based tax (US sales tax) Example: | Optional |
| postalCodeTo | string | stored | Ending postal code for range-based tax Example: | Optional |
| addressType | string | enum | Which address to use for tax determination Values: Example: | Optional |
Examples
Example 1
{
"@type": "TaxRule",
"tax": {
"@type": "Tax",
"code": "VAT-EU-DIGITAL-20"
},
"priority": 1,
"taxScope": "digital_services",
"productCategories": [
"software",
"streaming",
"e-books"
],
"customerTypes": [
"B2C"
],
"addressType": "billing"
}Example 2
{
"@type": "TaxRule",
"tax": {
"@type": "Tax",
"code": "US-CA-SALES-7.25"
},
"priority": 2,
"taxScope": "goods",
"productCategories": [],
"customerTypes": [
"B2C",
"B2B"
],
"postalCodeFrom": "90001",
"postalCodeTo": "96162",
"addressType": "shipping"
}