Create Calculations
Get tax information for a given product and address or IP
cURL Header Example
UseX-API-Version explicitly in requests:
- You can now provide
customer.ipinstead of (or in addition to)customer.addressfor IP-based tax resolution. - Optional
transacted_at(Unix timestamp in seconds): evaluate time-dependent inputs (e.g., out-of-state-seller status, rates) as of the sale time instead of now. - Optional
default_customer_type: fallback customer type whencustomer.iddoesn’t exist in Numeral yet. - US ZIP-to-state fallback:
address_provinceis still required and should always be sent, but if it is missing or empty on a US address, Thomas attempts to infer the state from a valid 5-digit ZIP (an unrecognized ZIP returns a 400MALFORMED_ADDRESS).
amount field on line items is per-unit price (taxable base = amount x quantity). Responses include address_resolution_status, address_used, and enhanced tax_jurisdictions fields (tax_authority_name, tax_authority_type, tax_type, tax_due_decimal).IP-Based Resolution
Instead of providing a full customer address, you can pass an IP address and we’ll resolve it to a taxable location:customer.address or customer.ip must be provided. If both are given, the address is used first with IP as a fallback.
Resolution Modes
New Response Fields
IP Resolution Errors
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-03-01 Body
Customer details. At least one of customer.address or customer.ip must be provided. Optionally accepts a customer ID for order tracking and exemptions.
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.
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).
Optional. The time the transaction occurred, as a Unix timestamp in seconds (not milliseconds). Used to determine which tax rates and rules apply at the time of the transaction (for example, during sales tax holidays), as well as other time-dependent inputs such as out-of-state-seller status. If omitted, the calculation uses the current time. Available in API version 2026-03-01 and later.
1772323200
Optional fallback customer type used when customer.id is provided but no matching customer exists in Numeral. Lets integration partners always pass a customer ID without first ensuring the customer has been created. When the lookup misses, this value drives tax-exemption logic and business tax-ID validation as if it were customer.type. If a matching customer is found, the stored customer.type takes precedence. Available in API version 2026-03-01 and later.
CONSUMER, BUSINESS "CONSUMER"
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_178336966110780ac0407-1c52-4322-972c-9fef2eb1b1d3"
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 default_customer_type or invalid_tax_id_customer_fallback_type is applied).
The automatic tax setting for this calculation.
auto, disabled "auto"
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.
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).
Which input was used for tax determination.
address, ip "address"
The precision level of the resolved location.
STREET, POSTAL_PLUS, POSTAL, PROVINCE, COUNTRY, APPROXIMATED "POSTAL"