curl --location --request POST 'https://api.stateset.com/v1/tax/calculate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"from_address": {
"line1": "100 Commerce Way",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90001",
"country": "US"
},
"to_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"line_items": [
{
"id": "item_1",
"quantity": 2,
"unit_price": 2999,
"product_category": "clothing"
},
{
"id": "item_2",
"quantity": 1,
"unit_price": 999,
"product_category": "food_grocery"
}
],
"shipping": {
"amount": 1000
},
"customer": {
"id": "cust_abc123",
"type": "retail"
}
}'
{
"object": "tax_calculation",
"order_total": 7997,
"taxable_amount": 6998,
"tax_amount": 613,
"effective_rate": 0.0876,
"line_items": [
{
"id": "item_1",
"amount": 5998,
"taxable_amount": 5998,
"tax_amount": 540,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 435,
"taxable_amount": 5998
},
{
"name": "San Francisco County Tax",
"rate": 0.0175,
"amount": 105,
"taxable_amount": 5998
}
]
},
{
"id": "item_2",
"amount": 999,
"taxable_amount": 0,
"tax_amount": 0,
"exemption_reason": "food_grocery_exempt"
}
],
"shipping": {
"amount": 1000,
"taxable_amount": 1000,
"tax_amount": 73,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 73
}
]
},
"jurisdictions": [
{
"name": "California",
"type": "state",
"rate": 0.0725,
"tax_amount": 508
},
{
"name": "San Francisco County",
"type": "county",
"rate": 0.0175,
"tax_amount": 105
}
],
"has_nexus": true,
"tax_registration": {
"state": "CA",
"registration_number": "CA-123456789"
},
"warnings": [],
"metadata": {
"calculation_timestamp": "2024-01-20T11:30:00Z",
"tax_engine_version": "2024.1"
}
}
Calculate taxes for an order based on location and items
curl --location --request POST 'https://api.stateset.com/v1/tax/calculate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"from_address": {
"line1": "100 Commerce Way",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90001",
"country": "US"
},
"to_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"line_items": [
{
"id": "item_1",
"quantity": 2,
"unit_price": 2999,
"product_category": "clothing"
},
{
"id": "item_2",
"quantity": 1,
"unit_price": 999,
"product_category": "food_grocery"
}
],
"shipping": {
"amount": 1000
},
"customer": {
"id": "cust_abc123",
"type": "retail"
}
}'
{
"object": "tax_calculation",
"order_total": 7997,
"taxable_amount": 6998,
"tax_amount": 613,
"effective_rate": 0.0876,
"line_items": [
{
"id": "item_1",
"amount": 5998,
"taxable_amount": 5998,
"tax_amount": 540,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 435,
"taxable_amount": 5998
},
{
"name": "San Francisco County Tax",
"rate": 0.0175,
"amount": 105,
"taxable_amount": 5998
}
]
},
{
"id": "item_2",
"amount": 999,
"taxable_amount": 0,
"tax_amount": 0,
"exemption_reason": "food_grocery_exempt"
}
],
"shipping": {
"amount": 1000,
"taxable_amount": 1000,
"tax_amount": 73,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 73
}
]
},
"jurisdictions": [
{
"name": "California",
"type": "state",
"rate": 0.0725,
"tax_amount": 508
},
{
"name": "San Francisco County",
"type": "county",
"rate": 0.0175,
"tax_amount": 105
}
],
"has_nexus": true,
"tax_registration": {
"state": "CA",
"registration_number": "CA-123456789"
},
"warnings": [],
"metadata": {
"calculation_timestamp": "2024-01-20T11:30:00Z",
"tax_engine_version": "2024.1"
}
}
tax:read
permissions.
Authorization: Bearer YOUR_API_KEY
curl --location --request POST 'https://api.stateset.com/v1/tax/calculate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"from_address": {
"line1": "100 Commerce Way",
"city": "Los Angeles",
"state": "CA",
"postal_code": "90001",
"country": "US"
},
"to_address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"line_items": [
{
"id": "item_1",
"quantity": 2,
"unit_price": 2999,
"product_category": "clothing"
},
{
"id": "item_2",
"quantity": 1,
"unit_price": 999,
"product_category": "food_grocery"
}
],
"shipping": {
"amount": 1000
},
"customer": {
"id": "cust_abc123",
"type": "retail"
}
}'
{
"object": "tax_calculation",
"order_total": 7997,
"taxable_amount": 6998,
"tax_amount": 613,
"effective_rate": 0.0876,
"line_items": [
{
"id": "item_1",
"amount": 5998,
"taxable_amount": 5998,
"tax_amount": 540,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 435,
"taxable_amount": 5998
},
{
"name": "San Francisco County Tax",
"rate": 0.0175,
"amount": 105,
"taxable_amount": 5998
}
]
},
{
"id": "item_2",
"amount": 999,
"taxable_amount": 0,
"tax_amount": 0,
"exemption_reason": "food_grocery_exempt"
}
],
"shipping": {
"amount": 1000,
"taxable_amount": 1000,
"tax_amount": 73,
"tax_breakdown": [
{
"name": "California State Sales Tax",
"rate": 0.0725,
"amount": 73
}
]
},
"jurisdictions": [
{
"name": "California",
"type": "state",
"rate": 0.0725,
"tax_amount": 508
},
{
"name": "San Francisco County",
"type": "county",
"rate": 0.0175,
"tax_amount": 105
}
],
"has_nexus": true,
"tax_registration": {
"state": "CA",
"registration_number": "CA-123456789"
},
"warnings": [],
"metadata": {
"calculation_timestamp": "2024-01-20T11:30:00Z",
"tax_engine_version": "2024.1"
}
}