About this endpoint
What it does
Calculates sales tax for a US amount using either a provided tax rate, a US state lookup, or an exact ZIP lookup when available. It supports both single-amount and multi-item cart calculations, with optional shipping and discount handling in item mode.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| zip | String | No | US ZIP code (5 digits or ZIP+4). Used to find the state. The rate is filled in only where it is exact: 0% for DE, NH and OR, or the state rate for states with no local add-on in the Tax Foundation midyear 2026 table. For any other state no rate is guessed; the response's zip.message says so, and you send taxPercent or state. |
| mode | ENUM | No | Allowed values: add, extract. |
| items | Object Array | No | Several items, used in add mode only. Each item may include: qty (integer, minimum 1, maximum 9007199254740991), name (string), price (number, minimum 0, required), taxable (boolean, default true). Maximum 100 items, minimum 1 item. Response adds cart with taxable and exempt subtotals, tax, total, steps and lines. |
| items[].qty | Integer | No | Quantity for the item, minimum 1, maximum 9007199254740991. |
| items[].name | String | No | Item name. |
| items[].price | Number | Yes | Item price, minimum 0. |
| items[].taxable | Boolean | No | Marks the item exempt when false. Default true. |
| state | String | No | US state code (two-letter code such as TX, or the full name; DC included). Looks up the state base sales tax rate only (Tax Foundation, 1 July 2026). Local city, county, and district rates are not included. |
| amount | Number | No | Amount to tax, or the tax-inclusive amount in extract mode. Required unless items is sent. Minimum 0. |
| shipping | Number | No | Shipping charged when using items. Minimum 0. |
| taxPercent | Number | No | Tax rate in percent. Required unless state or an exact zip is sent. Takes priority over state. Minimum 0, maximum 100. |
| discountPct | Number | No | With items: percentage discount on every line. Minimum 0, maximum 100. |
| shippingTaxable | Boolean | No | With items: true adds shipping to the taxable amount. Default false (rules differ by state, so you choose). |
Response
The endpoint returns a JSON object with the result under result. Which fields appear depends on how you called it, as shown in the last column.
| Field | Type | Description | Returned |
|---|---|---|---|
| taxAmount | Number | The sales tax, rounded to the cent (half a cent rounds up). With items, this is the tax for the whole cart. | Always |
| total | Number | Net plus tax. With items, the whole cart including exempt items, discount and shipping. | Always |
| net | Number | The amount before tax. With items, the whole cart after discount and including shipping. | Always |
| amount | Number | The amount you sent, or with items the sum of the item prices before any discount. | Always |
| ratePct | Number | The rate that was applied, in percent. | Always |
| rateSource | String | Where the rate came from, for example US state base rate (local taxes excluded) or taxPercent sent by the caller. | Always |
| state | String | The state used. | When the rate came from state or zip |
| stateBaseRatePct | Number | The state base rate, in percent. | When a state was used |
| averageCombinedRatePct | Number | The average combined state and local rate for the state, for reference only. It is not applied. | When a state was used |
| zip | Object | The state found from the ZIP, whether a rate was applied (rateApplied), a message, and the source. | When zip was sent |
| ratesAsOf | String | Who published the rate table and its date. | Always |
| ratesAsOfDate | String | Date of the rate table (YYYY-MM-DD). | When a state rate was used |
| ratesCheckedOn | String | Date the table was last checked (YYYY-MM-DD). | When a state rate was used |
| ratesAgeDays | Integer | Age of the rate table in days. | When a state rate was used |
| ratesStale | Boolean | true if the table is older than the review period. | When a state rate was used |
| cart | Object | The cart breakdown. | When items was sent |
| cart.subtotal | Number | Total of all items after any discount. | items |
| cart.taxableSubtotal | Number | Taxable items after any discount. | items |
| cart.exemptSubtotal | Number | Exempt items after any discount. | items |
| cart.shipping | Number | The shipping charge. | items |
| cart.shippingTaxable | Boolean | Whether shipping was taxed. | items |
| cart.taxableAmount | Number | The amount tax was worked out on: taxable items, plus shipping if taxed. | items |
| cart.tax | Number | Tax on the cart. | items |
| cart.total | Number | Total of the cart. | items |
| cart.lines | Array | The cart as readable lines, each with a label and a value. | items |
| cart.steps | Array | The cart calculation, one step at a time. | items |
| cart.note | String | A note about shipping and the state. | items |
| steps | Array | The calculation, one step at a time. | Always |
| steps[].label | String | Name of the step, for example Sales tax. | Always |
| steps[].formula | String | The formula used. | Always |
| steps[].inputs | Object | The numbers that went into the step. | Always |
| steps[].result | Number | The result of the step. | Always |
| taxYear | Integer | Tax year of the rates. | Always |
| sources | String | Where the rates come from, and when they were last checked. | Always |
| dataStatus | String | Status of the rate data. estimate means confirm with the tax authority. | Always |
| notes | String Array | Notes about this result, such as that local taxes are not included. | Always |
| disclaimer | String | Use notice. | Always |



