Skip to main content
POST
Get tax information for a given product and address.

cURL Header Example

Use X-API-Version explicitly in requests:
New in 2026-01-01:
  • The amount field on line items is now per-unit price (taxable base = amount x quantity).
  • customer.tax_ids use country-specific Stripe-style types (us_ein, eu_vat, gb_vat, …) instead of VAT/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_jurisdictions use 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, the amount field on line items represents the per-unit price rather than the total line item value:
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.

Enhanced Tax Jurisdictions

Tax jurisdiction objects now include richer detail: 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>
default:2026-01-01
required

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.

Available options:
2026-01-01

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

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.

metadata
object

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).

invalid_tax_id_customer_fallback_type
enum<string>

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.

Available options:
CONSUMER
Example:

"CONSUMER"

Response

Calculate response

id
string

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

Example:

"calc_1783369695581b8ca8647-a864-40f4-bf8a-10ff46f50856"

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. type reflects the effective customer type used for the calculation (e.g., after invalid_tax_id_customer_fallback_type is applied).

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
integer

Total tax to charge on this calculation, in the currency's smallest unit (rounded to an integer).

Example:

140

total_amount_excluding_tax
integer

Total sale charge excluding tax, in the currency's smallest unit (rounded to an integer).

Example:

2000

total_amount_including_tax
integer

Total sale charge plus tax, in the currency's smallest unit (rounded to an integer). What you should charge your customer.

Example:

2140

expires_at
integer

Unix timestamp in seconds at which the quoted tax rates expire — 24 hours after the calculation is created.

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. 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).