Fetch sales tax rates for a specific address using the TaxJar Rates API and apply product-level tax codes
domain: developer.taxjar.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Authenticate to the TaxJar API by including your TaxJar API token in the Authorization header as a Bearer token on all requests
Call GET /v2/rates/{zip} with optional query parameters for street, city, and state to retrieve the combined sales tax rate for the destination address; inspect the combined_rate, state_rate, county_rate, and city_rate fields in the response
Note that the Rates endpoint returns general rates and does not account for product-specific exemptions or reduced rates; for accurate product-level tax, use the TaxJar Tax endpoint (POST /v2/taxes) instead
When calling POST /v2/taxes, include line_items with product_tax_code values from TaxJar's published tax code taxonomy; TaxJar uses these codes to apply category-specific rates and exemptions such as reduced rates for groceries or clothing
Include the from address (nexus location) and to address (ship-to) in the request; TaxJar uses both to determine whether nexus exists and which jurisdiction's rules apply
Validate the tax_source field in the response to confirm whether the calculation is destination-based or origin-based, as this affects which rate is applied for in-state transactions
Known gotchas
The TaxJar Rates API endpoint returns the general combined rate for a location but does not apply product exemptions or special taxability rules; using Rates-endpoint output directly for transaction tax amounts produces incorrect results for exempt or reduced-rate product categories
TaxJar product tax codes are TaxJar-specific codes, not Avalara AvaTax codes; if migrating between platforms, product tax code mappings must be re-mapped rather than reused
The from_state nexus address affects whether a transaction is considered taxable at all; if the from address does not reflect a state where the seller has registered nexus, TaxJar may return zero tax for destinations in that state even where tax is legally due
Give your agent this knowledge — and 6,400+ more routes
One MCP install gives any agent live access to the full route map across 2,100+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp