Skip to main content
POST
/
tax
/
calculations
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_line_1": "4 Privet Drive",
      "address_city": "Little Whining",
      "address_province": "CA",
      "address_postal_code": "90210",
      "address_country": "US",
      "address_type": "shipping"
    }
  },
  "order_details": {
    "customer_currency_code": "USD",
    "tax_included_in_amount": false,
    "line_items": [
      {
        "reference_product_id": "wand_elder_12",
        "amount": 10000,
        "quantity": 1
      }
    ]
  }
}
'
{
  "id": "calc_1726683504829b84b2ad6-a4c9-4e0e-986f-7bb3d1fb17c9",
  "object": "tax.calculation",
  "customer_currency_code": "USD",
  "line_items": [
    {
      "product": {
        "reference_product_name": "Elder Wand",
        "reference_product_id": "wand_elder_12",
        "product_tax_code": "GENERAL_MERCHANDISE"
      },
      "tax_jurisdictions": [
        {
          "tax_rate": 0.1,
          "rate_type": "SALES TAX",
          "jurisdiction_name": "California",
          "fee_amount": 0
        }
      ],
      "quantity": 1,
      "tax_amount": 1000,
      "amount_excluding_tax": 10000,
      "amount_including_tax": 11000
    }
  ],
  "tax_included_in_amount": false,
  "total_tax_amount": 1000,
  "total_amount_excluding_tax": 10000,
  "total_amount_including_tax": 11000,
  "expires_at": 1726683511,
  "testmode": true,
  "address_resolution_status": "EXACT",
  "address_used": {
    "address_line_1": "4 Privet Drive",
    "address_city": "Little Whinging",
    "address_province": "CA",
    "address_postal_code": "90210",
    "address_country": "US"
  }
}
Get tax information for a given product and address.

cURL Header Example

Use X-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 '{ ... }'
New in 2026-01-01: The amount field on line items is now per-unit price (taxable base = amount x quantity). Responses include origin_address, metadata, address_resolution_status, address_used, and enhanced tax_jurisdictions fields.

Per-Unit Pricing

Starting with version 2026-01-01, the amount 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
}
If you are migrating from 2025-05-12 or earlier, you must update your integration to send per-unit prices instead of total line item values.

New Response Fields

FieldDescription
address_resolution_statusEXACT, POSTAL_FALLBACK_1, or POSTAL_ONLY — precision of the address match
address_usedThe resolved address that was actually used for tax calculation
metadataEchoed back from the request unchanged

Enhanced Tax Jurisdictions

Tax jurisdiction objects now include richer detail:
FieldDescription
tax_due_decimalTax amount for this jurisdiction in the currency’s smallest unit
tax_authority_nameName of the tax authority (e.g., “Tennessee”, “ALLEGHENY”)
tax_authority_typeType of authority (e.g., “STATE”, “COUNTY”, “CITY”, “DISTRICT”)
tax_typeType of tax: SALES, USE, VAT, or GST
rate_typeDescriptive rate classification (e.g., “GENERAL STATE SALES TAX”)
The jurisdiction_name and note fields from prior versions are no longer included.

Error Format

Error responses now use a flat format: { "code": number, "type": "ERROR_TYPE", "message": "..." }.

Error Codes Reference

See the complete list of error types and their meanings.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Version
enum<string>
required

API version to use.

Available options:
2026-03-01,
2026-01-01,
2025-05-12,
2024-09-01

Body

application/json
customer
object
required

Customer details. At least one of address or ip must be provided.

origin_address
object
required

Required from API version 2025-05-12+. The address that a product is shipped from.

order_details
object
required
metadata
object

You can store arbitrary keys and values in the metadata. Any valid JSON object whose values are less than 255 characters long is accepted.

Response

Calculate response

id
string

The ID of the calculation. You will use this to create a transaction.

Example:

"calc_123456789"

object
string

The type of object: tax.calculation.

Example:

"tax.calculation"

customer_currency_code
string

The ISO-4217 currency code of the transaction.

Example:

"USD"

customer
object

Customer information returned in the response.

automatic_tax
enum<string>

The automatic tax setting for this calculation.

Available options:
auto,
disabled
Example:

"auto"

line_items
object[]
tax_included_in_amount
boolean
Example:

false

total_tax_amount
number

Total tax to charge on this calculation.

Example:

14

total_amount_excluding_tax
number

Total sale charge, excluding tax.

Example:

200

total_amount_including_tax
number

Total sale charge plus tax. What you should charge your customer.

Example:

214

expires_at
number

Epoch datetime representing the date and time the tax rates are valid until.

Example:

1714787673

testmode
boolean

True if using a production API key. False if using a test API key.

Example:

"false"

address_resolution_status
enum<string>

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.

Available options:
EXACT,
POSTAL_FALLBACK_1,
POSTAL_ONLY
Example:

"EXACT"

address_used
object

The actual address used for tax calculation after resolution.

metadata
object

You can store arbitrary keys and values in the metadata. Any valid JSON object whose values are less than 255 characters long is accepted.

location_source
enum<string>

Which input was used for tax determination.

Available options:
address,
ip
Example:

"address"

resolution_precision
enum<string>

The precision level of the resolved location.

Available options:
STREET,
POSTAL_PLUS,
POSTAL,
PROVINCE,
COUNTRY,
APPROXIMATED
Example:

"POSTAL"