Skip to content

Decision API

Decision API

Determine if you must collect tax based on your sales data.

Endpoint

POST /v1/decision/collect

Request Body

{
"destination": {
"country": "US",
"region": "CA"
},
"seller_sales": {
"amount": 600000,
"transactions": 150,
"currency": "USD",
"period": "previous_calendar_year"
}
}

Example

Terminal window
curl -X POST "https://api.shipvat.com/v1/decision/collect" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"destination": {"country": "US", "region": "CA"},
"seller_sales": {"amount": 600000, "currency": "USD"}
}'

Response

{
"must_collect": true,
"explanation": "Sales of USD 600,000 exceed threshold of USD 500,000.",
"threshold_applied": {
"type": "REMOTE_SELLER_NEXUS",
"amount": 500000,
"currency": "USD",
"condition": "AMOUNT_ONLY"
},
"confidence": "HIGH",
"queried_at": "2024-01-15T10:30:00Z"
}

Decision Logic

The API evaluates:

  1. AMOUNT_ONLY: Sales amount vs threshold
  2. TX_ONLY: Transaction count vs threshold
  3. OR: Either condition triggers nexus
  4. AND: Both conditions required for nexus