Skip to main content
POST
/
v1
/
products
/
tax-preview
Preview Tax
curl --request POST \
  --url https://api.spairehq.com/v1/products/tax-preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 1,
  "currency": "<string>",
  "country": "<string>",
  "quantity": 1,
  "state": "<string>"
}
'
{
  "subtotal": 123,
  "tax_amount": 123,
  "total": 123,
  "currency": "<string>",
  "quantity": 123,
  "tax_rate": {
    "display_name": "<string>",
    "percentage": 123
  },
  "taxability_reason": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.spairehq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

You can generate a Personal Access Token from your settings.

Body

application/json

Request body for previewing tax on a product price.

amount
integer
required

Amount in smallest currency unit (e.g. cents for USD).

Required range: x >= 0
currency
string
required

ISO 4217 currency code (e.g. 'usd').

country
string
required

ISO 3166-1 alpha-2 country code (e.g. 'AU').

Required string length: 2
quantity
integer
default:1

Unit quantity for the preview calculation.

Required range: x >= 1
state
string | null

State/province code for US/CA (e.g. 'WA' or 'US-WA').

Response

Successful Response

Tax preview result for a product price.

subtotal
integer
required
tax_amount
integer
required
total
integer
required
currency
string
required
quantity
integer
required
tax_rate
TaxRatePreview · object
taxability_reason
string | null