A calculation quotes the tax for a cart. Create one at checkout after the customer enters an address and before you take payment. Use its
id to record a transaction once the customer pays.The response has the totals and a breakdown for each line item. Most integrations charge total_tax_amount and keep the breakdown for their records.Where calculations fit in checkout
The Calculation object
Attributes
One entry per line item in the request.
Product information for this line item.
One row per taxing jurisdiction that applies to this line item.
Statutory rate for the jurisdiction, as a decimal fraction (
0.0725 = 7.25%). Some rates apply to only part of the amount, so don’t sum these. See Effective tax rate.Type of rate:
sales_tax for US Streamlined Sales Tax (SST) states, general state sales tax / general county local sales tax for other US states, standard for VAT countries. Zero-rate placeholder rows, e.g. when automatic_tax is disabled, use VAT.Name of the jurisdiction: a state or county name in the US, the ISO country code for VAT countries (e.g.
DE).How the row was calculated, e.g.
RATE_FRAC. Zero-tax placeholder rows carry a reason instead, e.g. automatic_tax_disabled, or no_collection_exempt_customer for a tax-exempt customer.How the customer address was resolved:
EXACT (exact address match), POSTAL_FALLBACK_1 (fell back to the postal code), or POSTAL_ONLY (only the postal code was used).The Calculation object
Effective tax rate
Eachtax_rate is the statutory rate for its jurisdiction, and in some jurisdictions a rate applies to only part of the line item amount, so adding up tax_rate values can overstate the tax.- Tennessee’s single article rules are the common case: local rates apply only to the first $1,600 of an item, and the 2.75% state single article rate only to the portion between $1,600 and $3,200. For a $10,000 item the returned rates sum to 12.25%, but the tax due is $788, an effective rate of 7.88%.
- Rows whose rate applies to only part of the amount carry a
noteother thanRATE_FRAC, such asPROGRESSIVE_RATE. - There’s no effective rate field in this version. For a line, compute
tax_amount / amount_excluding_tax.
tax_amount (or total_tax_amount).Create a calculation
Quotes tax for a cart. SendX-API-Version: 2025-05-12 on every request; without it, requests fall back to 2024-09-01 unless your account has a default version set. Try it in the API reference.Parameters
Who is buying.
customer.address is required.Destination address. This version supports 82 destination countries: US, Canada, the EU member states, and more (full list in the API reference).
ISO 3166-2 subdivision code. For US and Canada, a valid uppercase USPS state code or Canadian province code.
The customer’s
id or your reference_customer_id, for a customer you created in Numeral. Used for record keeping and tax exemptions.CONSUMER for private individuals not registered for VAT/GST. BUSINESS for companies, sole proprietors, or other legal entities registered for VAT/GST. See Business customers and tax IDs.Required when
type is BUSINESS and the address is outside the US. Not allowed for CONSUMER. Each has type (VAT, GST, or EIN) and value, both required.The cart.
ISO 4217 currency code. This version supports 126 currencies. See supported currencies.
auto returns real rates where you have an active registration. disabled always returns 0. Must be auto for US addresses. See Automatic tax.One entry per product. Each needs
reference_product_id or product_category.Total price of the line, not per-unit, in the currency’s smallest unit (
2000 = $20.00 in USD, ¥2000 in JPY). Tax is calculated on this value as is.Quantity sold. Record keeping only in this version: it doesn’t change the taxable amount.
Tax category from the category list. Required if no
reference_product_id.Your product ID, as created in Numeral. Required if no
product_category.Used when
reference_product_id isn’t found in Numeral, instead of returning an error. Must be a valid category, or the request returns a 400. If the product is found, its stored category wins.Ship-from address. Required unless a default origin address is set for the destination jurisdiction on your account; without either, the request returns a 400. Same fields as
customer.address, without address_type.Returns
A Calculation object.POST /tax/calculations
Response
Business customers and tax IDs
customer.type switches on business-to-business (B2B) tax logic.CONSUMER(default): standard business-to-consumer tax.tax_idsaren’t allowed.BUSINESS: send validtax_ids(not needed for US addresses). This enables B2B exemptions and reverse charge where they apply.
skip_tax_id_validation: true:VATIDs are checked against the EU VIES database.GSTIDs are validated for the countries where they apply.- An invalid tax ID returns an error.
VAT, GST, and EIN tax ID types.Business request
Business response
Errors
Errors return anerror object with error_code, error_message, and sometimes error_meta (details such as the offending field and the expected and received types). Handle them by error_code. The request ID is in the X-Request-Id response header.Also returned:
- 400 when there’s no
origin_addressand no default origin address for the destination. - 400 when
fallback_product_categoryisn’t a valid category. - 404 when
reference_product_iddoesn’t exist and nofallback_product_categorywas sent.
400