curl --request POST \
--url https://api.numeralhq.com/tax/calculations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <x-api-version>' \
--data '
{
"customer": {
"address": {
"address_city": "Nashville",
"address_country": "US",
"address_line_1": "123 Broadway",
"address_postal_code": "37203",
"address_province": "TN",
"address_type": "billing"
}
},
"metadata": {
"payment_id": "68407cb7-e1fa-47fa-8244-bd9411d53c61"
},
"order_details": {
"automatic_tax": "auto",
"customer_currency_code": "USD",
"line_items": [
{
"amount": 10000,
"product_category": "BEVERAGES",
"quantity": 1
},
{
"amount": 10000,
"product_category": "GENERAL_MERCHANDISE",
"quantity": 1
}
],
"tax_included_in_amount": false
},
"origin_address": {
"address_city": "Nashville",
"address_country": "US",
"address_line_1": "500 Church St",
"address_line_2": "",
"address_postal_code": "37219",
"address_province": "TN"
}
}
'{
"testmode": true,
"id": "calc_1783369695581b8ca8647-a864-40f4-bf8a-10ff46f50856",
"object": "tax.calculation",
"customer_currency_code": "USD",
"line_items": [
{
"line_item_id": "li_17833696955814e3b8c1c-7ca2-42d0-9f71-1fb8e7c19cd7",
"product": {
"reference_line_item_id": "",
"reference_product_id": "default-beverages",
"reference_product_name": "Default BEVERAGES Product",
"product_tax_code": "BEVERAGES"
},
"tax_jurisdictions": [
{
"tax_rate": 0.07,
"tax_due_decimal": 700,
"fee_amount": 0,
"rate_type": "GENERAL STATE SALES TAX",
"tax_authority_name": "Tennessee",
"tax_authority_type": "",
"tax_type": "SALES"
},
{
"tax_rate": 0.0225,
"tax_due_decimal": 225,
"fee_amount": 0,
"rate_type": "GENERAL COUNTY LOCAL SALES TAX",
"tax_authority_name": "DAVIDSON",
"tax_authority_type": "",
"tax_type": "SALES"
}
],
"tax_amount": 925,
"amount_excluding_tax": 10000,
"amount_including_tax": 10925,
"quantity": 1
},
{
"line_item_id": "li_17833696955814e3b8c1c-7ca2-42d0-9f71-1fb8e7c19cd8",
"product": {
"reference_line_item_id": "",
"reference_product_id": "default-general-merchandise",
"reference_product_name": "Default GENERAL_MERCHANDISE Product",
"product_tax_code": "GENERAL_MERCHANDISE"
},
"tax_jurisdictions": [
{
"tax_rate": 0.07,
"tax_due_decimal": 700,
"fee_amount": 0,
"rate_type": "GENERAL STATE SALES TAX",
"tax_authority_name": "Tennessee",
"tax_authority_type": "",
"tax_type": "SALES"
},
{
"tax_rate": 0.0225,
"tax_due_decimal": 225,
"fee_amount": 0,
"rate_type": "GENERAL COUNTY LOCAL SALES TAX",
"tax_authority_name": "DAVIDSON",
"tax_authority_type": "",
"tax_type": "SALES"
}
],
"tax_amount": 925,
"amount_excluding_tax": 10000,
"amount_including_tax": 10925,
"quantity": 1
}
],
"total_tax_amount": 1850,
"tax_included_in_amount": false,
"total_amount_excluding_tax": 20000,
"total_amount_including_tax": 21850,
"expires_at": 1783456095,
"metadata": {
"payment_id": "68407cb7-e1fa-47fa-8244-bd9411d53c61"
},
"customer": {
"type": "CONSUMER"
},
"automatic_tax": "auto",
"address_resolution_status": "EXACT",
"address_used": {
"address_line_1": "123 Broadway",
"address_city": "Nashville",
"address_province": "TN",
"address_postal_code": "37203",
"address_country": "US"
}
}Create Calculations
Get tax information for a given product and address
curl --request POST \
--url https://api.numeralhq.com/tax/calculations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: <x-api-version>' \
--data '
{
"customer": {
"address": {
"address_city": "Nashville",
"address_country": "US",
"address_line_1": "123 Broadway",
"address_postal_code": "37203",
"address_province": "TN",
"address_type": "billing"
}
},
"metadata": {
"payment_id": "68407cb7-e1fa-47fa-8244-bd9411d53c61"
},
"order_details": {
"automatic_tax": "auto",
"customer_currency_code": "USD",
"line_items": [
{
"amount": 10000,
"product_category": "BEVERAGES",
"quantity": 1
},
{
"amount": 10000,
"product_category": "GENERAL_MERCHANDISE",
"quantity": 1
}
],
"tax_included_in_amount": false
},
"origin_address": {
"address_city": "Nashville",
"address_country": "US",
"address_line_1": "500 Church St",
"address_line_2": "",
"address_postal_code": "37219",
"address_province": "TN"
}
}
'{
"testmode": true,
"id": "calc_1783369695581b8ca8647-a864-40f4-bf8a-10ff46f50856",
"object": "tax.calculation",
"customer_currency_code": "USD",
"line_items": [
{
"line_item_id": "li_17833696955814e3b8c1c-7ca2-42d0-9f71-1fb8e7c19cd7",
"product": {
"reference_line_item_id": "",
"reference_product_id": "default-beverages",
"reference_product_name": "Default BEVERAGES Product",
"product_tax_code": "BEVERAGES"
},
"tax_jurisdictions": [
{
"tax_rate": 0.07,
"tax_due_decimal": 700,
"fee_amount": 0,
"rate_type": "GENERAL STATE SALES TAX",
"tax_authority_name": "Tennessee",
"tax_authority_type": "",
"tax_type": "SALES"
},
{
"tax_rate": 0.0225,
"tax_due_decimal": 225,
"fee_amount": 0,
"rate_type": "GENERAL COUNTY LOCAL SALES TAX",
"tax_authority_name": "DAVIDSON",
"tax_authority_type": "",
"tax_type": "SALES"
}
],
"tax_amount": 925,
"amount_excluding_tax": 10000,
"amount_including_tax": 10925,
"quantity": 1
},
{
"line_item_id": "li_17833696955814e3b8c1c-7ca2-42d0-9f71-1fb8e7c19cd8",
"product": {
"reference_line_item_id": "",
"reference_product_id": "default-general-merchandise",
"reference_product_name": "Default GENERAL_MERCHANDISE Product",
"product_tax_code": "GENERAL_MERCHANDISE"
},
"tax_jurisdictions": [
{
"tax_rate": 0.07,
"tax_due_decimal": 700,
"fee_amount": 0,
"rate_type": "GENERAL STATE SALES TAX",
"tax_authority_name": "Tennessee",
"tax_authority_type": "",
"tax_type": "SALES"
},
{
"tax_rate": 0.0225,
"tax_due_decimal": 225,
"fee_amount": 0,
"rate_type": "GENERAL COUNTY LOCAL SALES TAX",
"tax_authority_name": "DAVIDSON",
"tax_authority_type": "",
"tax_type": "SALES"
}
],
"tax_amount": 925,
"amount_excluding_tax": 10000,
"amount_including_tax": 10925,
"quantity": 1
}
],
"total_tax_amount": 1850,
"tax_included_in_amount": false,
"total_amount_excluding_tax": 20000,
"total_amount_including_tax": 21850,
"expires_at": 1783456095,
"metadata": {
"payment_id": "68407cb7-e1fa-47fa-8244-bd9411d53c61"
},
"customer": {
"type": "CONSUMER"
},
"automatic_tax": "auto",
"address_resolution_status": "EXACT",
"address_used": {
"address_line_1": "123 Broadway",
"address_city": "Nashville",
"address_province": "TN",
"address_postal_code": "37203",
"address_country": "US"
}
}cURL Header Example
UseX-API-Version explicitly in requests:
curl --request POST \
--url https://api.numeralhq.com/tax/calculations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Version: 2026-01-01' \
--data '{ ... }'
- The
amountfield on line items is now per-unit price (taxable base =amount x quantity). customer.tax_idsuse country-specific Stripe-style types (us_ein,eu_vat,gb_vat, …) instead ofVAT/GST/EIN.- New optional top-level
invalid_tax_id_customer_fallback_type("CONSUMER"): fall back to CONSUMER treatment instead of a 400 when business tax ID validation fails. - Response
tax_jurisdictionsuse the enhanced format below; errors use a new flat format.
address_resolution_status, address_used, and the metadata echo already existed in 2025-05-12.)Per-Unit Pricing
Starting with version 2026-01-01, theamount field on line items represents the per-unit price rather than the total line item value:
{
"amount": 2500, // $25.00 per unit
"quantity": 3 // taxable base = $75.00
}
Enhanced Tax Jurisdictions
Tax jurisdiction objects now include richer detail:| Field | Description |
|---|---|
tax_due_decimal | Unrounded tax due for this jurisdiction, in the currency’s smallest unit (may be fractional; 0 for flat-fee rows — see fee_amount) |
tax_authority_name | Name of the tax authority (e.g., “Tennessee”, “ALLEGHENY”) |
tax_authority_type | Type of authority (e.g., “STATE”, “COUNTY”, “CITY”, “DISTRICT”) |
tax_type | Type of tax: SALES, USE, VAT, or GST |
rate_type | Descriptive rate classification (e.g., “GENERAL STATE SALES TAX”) |
jurisdiction_name and note fields from prior versions are no longer included.
tax_rate values. Each tax_rate in tax_jurisdictions is the statutory rate for that jurisdiction, and in some jurisdictions a rate applies to only part of the line item amount. Tennessee’s single article rules are the common example: local rates apply only to the first $1,600 of an item, and the 2.75% state single article rate applies 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%.Always charge the returned tax_amount (or total_tax_amount). If you need an effective rate, compute tax_amount / amount_excluding_tax from the response rather than adding up tax_rate values. The per-jurisdiction tax_due_decimal field shows how much each jurisdiction actually contributed.Error Format
Error responses now use a flat format:{ "code": number, "type": "ERROR_TYPE", "message": "..." }.
Error Codes Reference
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The API version for this request. Always set a version: pass this header explicitly (recommended), or configure a default API version on your account and omit the header. Accounts with no configured version fall back to 2024-09-01, NOT this version.
2026-01-01 Body
Customer details. Address is required. Optionally accepts a customer ID for order tracking and exemptions.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The address that a product is shipped from. Required at calculation time unless a default origin address is configured for the destination jurisdiction on your account — omitting it with no default configured returns a 400.
Show child attributes
Show child attributes
You can store arbitrary keys and values in the metadata. At most 50 keys; each key at most 255 characters; each value must be a string of at most 255 characters (non-string values are rejected).
Show child attributes
Show child attributes
Optional. When business tax ID validation fails, fall back to treating the customer as this type instead of returning a 400. CONSUMER is the only accepted value. Available in API version 2026-01-01 and later.
CONSUMER "CONSUMER"
Response
Calculate response
The ID of the calculation. You will use this to create a transaction.
"calc_1783369695581b8ca8647-a864-40f4-bf8a-10ff46f50856"
The type of object: tax.calculation.
"tax.calculation"
The ISO-4217 currency code of the transaction.
"USD"
Customer information returned in the response. type reflects the effective customer type used for the calculation (e.g., after invalid_tax_id_customer_fallback_type is applied).
Show child attributes
Show child attributes
The automatic tax setting for this calculation.
auto, disabled "auto"
Show child attributes
Show child attributes
false
Total tax to charge on this calculation, in the currency's smallest unit (rounded to an integer).
140
Total sale charge excluding tax, in the currency's smallest unit (rounded to an integer).
2000
Total sale charge plus tax, in the currency's smallest unit (rounded to an integer). What you should charge your customer.
2140
Unix timestamp in seconds at which the quoted tax rates expire — 24 hours after the calculation is created.
1714787673
True if using a production API key. False if using a test API key.
false
Status of address resolution for the customer address. EXACT: exact address match found, POSTAL_FALLBACK_1: used postal code fallback, POSTAL_ONLY: only postal code was used for tax calculation.
EXACT, POSTAL_FALLBACK_1, POSTAL_ONLY "EXACT"
The actual address used for tax calculation after resolution.
Show child attributes
Show child attributes
You can store arbitrary keys and values in the metadata. At most 50 keys; each key at most 255 characters; each value must be a string of at most 255 characters (non-string values are rejected).
Show child attributes
Show child attributes