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.

10 properties
Schema

Properties

PropertyTypeModeDescriptionRequired
taxTax
stored

Reference to the Tax entity

Required
prioritynumber
stored

Priority order for tax rule evaluation (lower number = higher priority)

Example: 1

Optional
taxScopestring
enum

What this tax applies to

Values: goods, services, digital_goods, digital_services, shipping, handling, all

Example: "goods"

Optional
productCategoriesstring[]
stored

List of product categories this tax applies to (empty = all)

Example: ["food","books","medicine"]

Optional
customerTypesstring[]
stored

Customer types this tax applies to (B2C, B2B, government, etc.)

Example: ["B2C","B2B"]

Optional
minimumAmountMonetaryAmount
stored

Minimum transaction amount for tax to apply

Optional
maximumAmountMonetaryAmount
stored

Maximum tax amount cap

Optional
postalCodeFromstring
stored

Starting postal code for range-based tax (US sales tax)

Example: "10001"

Optional
postalCodeTostring
stored

Ending postal code for range-based tax

Example: "10999"

Optional
addressTypestring
enum

Which address to use for tax determination

Values: billing, shipping, origin

Example: "shipping"

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"
}