Excise Tax Calculator¶
Powered by ext_excise_engine
The Excise Tax Calculator is powered by the ext_excise_engine extension. See Building Extensions → Excise Tax.
The Excise Tax Calculator is an admin tool under Tools → Excise Tax Calculator that runs ad-hoc excise-tax quotes against the excise engine without needing to create a cart.
Use it to:
- Spot-check a rate before adding a new product
- Answer a buyer's "what would this cost in my ZIP?" question
- Validate a jurisdiction-specific rate after a tax-data update
How it works¶
The calculator posts an ExciseEngineCalcAddressInput + ExciseEngineCalcLineInput payload to the exciseEngineCalculateTax resolver, which invokes the same excise strategy the checkout pipeline uses. It returns per-line tax amounts, the applied rate, the rate type (percent, per-unit, etc.), and the matched jurisdiction — so the number you see is the number the buyer would be charged at checkout.
Input fields¶
| Field | Notes |
|---|---|
State, County, City, ZIP |
Ship-to address used for jurisdiction lookup. Country defaults to US. |
SKU |
Optional — echoed back on the result line for log-friendly output. |
Unit price |
Per-unit sale price in the channel's base currency. |
Tax class |
Product tax class slug. Tax classes are synced from the external Excise Engine API into the local ee_tax_classes table (they are not hardcoded); products reference them via the excise_engine_tax_class_slug trait. The exact set depends on your Excise Engine industry — examples might include ecig_device, nicotine_liquid, otp_tobacco, or spirits. Determines which excise rules apply. |
ml, nic mg, weight, cost |
Unit attributes — only the ones relevant to the tax class affect the result. |
Qty |
Number of units to price. |
Reading the result¶
The result pane shows:
Success— true/false; false carries anerrormessage (e.g., "state not supported")Total tax— sum across all lines- Per-line breakdown:
taxAmount,rate,rateType,jurisdiction(the code of the matched rule)
When to use it vs the checkout pipeline¶
| Scenario | Use |
|---|---|
| One-off quote | Calculator |
| Before adding a new SKU, confirm its class maps correctly | Calculator |
| Regression test after a tax-data import | Calculator (or seeded fixtures) |
| Actual buyer-facing quote | Real cart — excise auto-applies at checkout |
Developer Reference¶
The calculator is a thin wrapper around the ext_excise_engine extension. For the extension contract (stage 200, traits read, state-restrictions linkage) see Building Extensions → Excise Tax.