POST /api/v1/tax/calculate

US sales tax API — ZIP + street-level SST rates in one call.

Cloudflare Workers + D1 tax engine for all 50 states and DC. Auth with x-api-key: ustax_… Plans from $20/mo (1,000 req/day).

/docs /api /openapi.json /account /dashboard /health

Live data on this Worker

From production D1 on tax.invictusmall.com.

51states + DC covered
36,847ZIP rate rows in D1
1,734taxability rules
34product categories

Engine capabilities

Ship-to address + line items → combined rate, tax amount, jurisdiction split, taxability, optional Census verify.

Nationwide ZIP rates

50 states + DC. SSTGB official ZIP5 (Z) rates in D1, with local fallback when needed.

Street-level SST matching

When a street is provided, prefer SSTGB A-records from R2 (`rate_source=sst_street`).

Category taxability

Apply state-law treatment by `items[].category` (e.g. clothing exemptions, reduced rates).

Sales-tax holidays

Holiday windows are applied when `transaction_date` falls in a published state holiday period.

Free address verification

Default provider is the US Census Geocoder (no extra vendor fee). Optional Google / Smarty via secrets.

Jurisdiction breakdown

Each calculation returns state / county / city / special district amounts and combined rate.

HTTP surface

Interactive docs at /docs · machine index at /api · schema at /openapi.json.

MethodPathWhat it doesAuth
POST /api/v1/tax/calculate Calculate tax for a ship-to address and line items x-api-key
POST /api/v1/address/verify Verify / standardize an address (Census Geocoder by default) x-api-key
GET /api/v1/tax/rates Look up ZIP tax rates by state, ZIP, and date x-api-key
GET /api/v1/tax/categories List product taxability categories for a state x-api-key
GET /api/v1/tax/coverage Coverage stats (states, ZIPs, taxability rules) public
GET /health Health check and feature flags public
GET /docs Interactive Swagger UI public
GET /openapi.json OpenAPI 3 specification public

Rate source priority

  1. sst_street — SSTGB street A-record (R2) when street is present
  2. sst_official — SSTGB ZIP5 Z-record in D1
  3. local_d1 — local ZIP table fallback

Quickstart

Get a key from /account (self-serve) or /dashboard (admin), then:

curl -sS -X POST 'https://tax.invictusmall.com/api/v1/tax/calculate' \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_USTAX_KEY' \
  -d '{
    "transaction_date": "2026-10-15",
    "customer_address": {
      "street": "1928 Pike Place",
      "city": "Seattle",
      "state": "WA",
      "zip": "98101"
    },
    "items": [
      { "category": "goods.general", "unit_price": 100, "quantity": 1 }
    ]
  }'

Monthly plans

USD, billed monthly, pre-tax. Checkout tax is computed by this same API from your billing address and added on the Stripe invoice. Quotas reset UTC midnight; over quota → HTTP 429. Upgrade/downgrade from /account.

Starter

Starter

$20 / mo + tax

For early-stage stores validating destination sales tax.

  • 1,000 authenticated API requests / day (UTC)
  • 1 API key (reveal + rotate in profile)
  • calculate · address verify · rates · categories
  • ZIP + street-level SST rates
  • Category taxability + sales-tax holidays
  • Free Census address verification
Subscribe · Starter

Change plan anytime in your account after checkout.

Most used

Growth

$79 / mo + tax

For growing ecommerce and checkout flows.

  • 10,000 authenticated API requests / day (UTC)
  • 3 API keys
  • calculate · address verify · rates · categories
  • ZIP + street-level SST rates
  • Category taxability + sales-tax holidays
  • Free Census address verification
Subscribe · Growth

Change plan anytime in your account after checkout.

Business

Business

$199 / mo + tax

For multi-store and high-volume tax calculations.

  • 50,000 authenticated API requests / day (UTC)
  • 10 API keys
  • calculate · address verify · rates · categories
  • ZIP + street-level SST rates
  • Category taxability + sales-tax holidays
  • Free Census address verification
Subscribe · Business

Change plan anytime in your account after checkout.