POST
/
tax
/
calculations
curl --request POST \
--url https://api.numeralhq.com/tax/calculations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"customer": {
"address": {
"address_line_1": "4 Privet Drive",
"address_city": "Little Whinging",
"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

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>
default:2024-09-01

API version to use. Defaults to 2024-09-01 if not specified.

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

Body

application/json
customer
object
required

Customer details. Address is required. Optionally accepts a customer ID for order tracking and exemptions.

order_details
object
required
origin_address
object

Optional, but relevant for tax collection in certain jurisdictions. The address that a product is shipped from.

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. Available with API version 2025-05-12.

automatic_tax
enum<string>

The automatic tax setting for this calculation. Available with API version 2025-05-12.

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. Available with API version 2025-05-12 only. 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. Available with API version 2025-05-12 only.

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.