Tax & Territory
Tax & Territory is the domain that defines which taxes exist, determines when they apply to orders and returns, and supplies the geographic reference data used by tax, shipping, and regional segmentation logic.
This first pass treats the domain as four connected layers:
- tax definitions and operator-maintained rates
- derived tax results on commercial records
- nexus and exemption-aware tax selection
- shared territorial data used across tax and adjacent domains
Status
- [x] Domain overview written
- [x] Subdomains reviewed
- [x] Technical node pages linked
- [x] End-user concept pages linked
- [x] Task guides linked
Responsibility
This domain is responsible for:
- storing reusable tax-rate definitions by jurisdiction, country, and state
- calculating and persisting derived tax lines on orders, returns, invoices, and other taxable records
- selecting rates from either the database provider or the TaxJar provider
- supporting customer and order-level custom tax-rate overrides
- recording nexus records used for tax-exempt customer handling and provider-specific eligibility
- exposing shared country, state, geo-region, and sale-region data to other domains
Subdomains
Tax Definitions And Operator SetupTaxRate- admin Settings > Taxes
- tax provider configuration
Derived Tax ResultsTaxLine- order tax lines
- order return tax lines
Nexus And Exemption RoutingNexus- customer-level exemption sync
- order and customer custom tax-rate overrides
Shared Territory ModelGeoRegionSaleRegionCountryState
Classification Decisions
Standalone technical pages
Standalone end-user pages
Standalone task guides
Folded into parent pages for now
SaleRegion- folded into
Geo RegionandRegionsbecause the shared package exposes sale regions mainly as supporting segmentation data rather than a first-pass workflow owner
- folded into
Country- folded into
Tax RateandRegionsbecause country data is user-visible reference data used by address entry, tax setup, and shipping flows
- folded into
State- folded into
Tax Rate,Nexus, andRegionsbecause state selection is central to tax setup, address entry, and eligibility checks but not a standalone authored business concept
- folded into
OrderTaxRateItemCode- folded into
Tax RateandTax Linebecause it is provider-side caching and mapping infrastructure rather than a direct operator workflow
- folded into
- customer and order custom-tax-rate attachments
- folded into
Tax Ratebecause they are downstream override behaviors attached from customer and order review flows
- folded into
- address-to-region syncing
- folded into
Geo Regionbecause it is an automation detail, not a standalone user-facing capability
- folded into
Explicitly not getting standalone end-user concept pages in this pass
NexusTax Line
Nexus is important technically, but the inspected shared package exposes it primarily through admin API and tax-provider behavior rather than a polished shared operator destination. TaxLine is a derived financial result, not something a user authors directly.
Evidence Highlights
Framework ownership
packages/framework/src/Models/TaxRate.phppackages/framework/src/Models/TaxLine.phppackages/framework/src/Models/Nexus.phppackages/framework/src/Models/GeoRegion.phppackages/framework/src/Models/SaleRegion.phppackages/framework/src/Models/Country.phppackages/framework/src/Models/State.php
Admin and operations surfaces
packages/admin/src/Livewire/Admin/Settings/Taxespackages/framework/src/Http/Controllers/Api/Admin/TaxRatesController.phppackages/framework/src/Http/Controllers/Api/Admin/TaxLinesController.phppackages/framework/src/Http/Controllers/Api/Admin/OrderTaxLinesController.phppackages/framework/src/Http/Controllers/Api/Admin/OrderReturnTaxLinesController.phppackages/framework/src/Http/Controllers/Api/Admin/GeoRegionsController.phppackages/framework/src/Actions/Nexus/Requests/Index.phppackages/framework/routes/admin.php
Storefront and shared read surfaces
packages/framework/src/Http/Controllers/Api/Storefront/OrderTaxLinesController.phppackages/framework/src/Http/Controllers/Api/World/StatesController.php
Core behavior and automation
packages/framework/src/Actions/TaxRate/GetOrderTaxRates.phppackages/framework/src/Actions/TaxRate/Provider/Database/GetOrderTaxRates.phppackages/framework/src/Actions/TaxRate/Provider/TaxJar/GetOrderTaxRates.phppackages/framework/src/Actions/TaxJar/GetTaxRates.phppackages/framework/src/Models/Traits/Taxable.phppackages/framework/src/Observers/NexusObserver.phppackages/framework/src/Actions/GeoRegion/SyncAddresses.phppackages/framework/src/Actions/GeoRegion/SyncShippingPostalCodes.php
Navigation Notes
Tax Rateis the operator-authored tax definition.Tax Lineis the calculated money result attached to a taxable record.Nexushere is not just company nexus. The shared model can point to a customer or address and is also used for wholesale-exemption behavior with TaxJar.Geo RegionandSale Regionare not the same thing. Geo regions hold geographic shapes and postal-code matching logic; sale regions are higher-level groupings built from geo regions.CountryandStateare shared reference data used by this domain, not tax-only concepts.- The inspected shared package clearly exposes
Tax Ratesin admin UI. Most other territory behavior is experienced through address forms, location setup, and order review rather than through a dedicated packaged region workspace.