Tax Calculator API

Calculate surplus lines taxes and fees for all 50 U.S. states via a simple REST API.

https://api.sltax360.com/api/v1/calculator
POST /estimate
Documentation

Authentication

All API requests require a Bearer token in the Authorization header.

HTTP Header
Authorization: Bearer sltax_t2_your_api_key_here

Token Format

API keys follow the format sltax_t2_<random> where t2 identifies the token version. Keys are issued per-tenant and scoped to your account.

Security: Never expose API keys in client-side code, public repositories, or browser requests. Always make API calls from your server.

Get an API Key

Quick Start

Calculate surplus lines tax for a $50,000 premium in Texas with a single API call:

cURL
curl -X POST https://api.sltax360.com/api/v1/calculator/estimate \
  -H "Authorization: Bearer sltax_t2_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "TX",
    "premium": 50000,
    "policy_fees": 500
  }'

The response includes an itemized breakdown of every tax and fee:

Response — 200 OK
{
  "success": true,
  "data": {
    "state": { "id": 44, "code": "TX", "name": "Texas" },
    "input": { "premium": 50000, "policy_fees": 500, "effective_date": "2026-02-26" },
    "tax_base": 50500,
    "line_items": [
      { "name": "Surplus Lines Tax", "code": "sl_tax", "rate": 4.85, "rate_type": "percentage", "amount": 2449.25 },
      { "name": "Stamping Fee", "code": "stamping_fee", "rate": 0.075, "rate_type": "percentage", "amount": 37.88 }
    ],
    "rounding_rule": "standard",
    "total_taxes_and_fees": 2487.13,
    "total_due": 52987.13,
    "special_notes": "Texas: 4.85% SL tax, 0.075% stamping fee to SLTX. Tax is on total gross premium including policy fees.",
    "calculated_at": "2026-02-26T15:30:45+00:00"
  },
  "meta": {
    "timestamp": "2026-02-26T15:30:45Z",
    "request_id": "req_a1b2c3d4e5f6",
    "response_time_ms": 45
  }
}
Try it free: Test calculations interactively with our free online tax calculator before integrating the API.

POST /estimate

POST /api/v1/calculator/estimate Authenticated

Calculate surplus lines taxes and fees for a given state and premium amount. Returns an itemized breakdown of all applicable taxes and fees.

Request Parameters

Send as JSON request body.

Parameter Type Description
state required string 2-letter state code (e.g., "TX", "CA", "FL")
premium required number Premium amount in USD. Must be greater than 0.01.
policy_fees optional number Policy fees in USD. Defaults to 0. Some states include fees in the tax base.
effective_date optional string Date in YYYY-MM-DD format for rate lookup. Defaults to today. Use for historical calculations.

Response Fields

Field Type Description
state object State info: id, code, name
input object Echo of your input parameters
tax_base number Computed tax base (premium, or premium + fees depending on state rules)
line_items array Itemized list of taxes and fees. Each item has name, code, rate, rate_type, amount, unrounded_amount
rounding_rule string State rounding rule: standard, whole_dollar, or no_rounding
total_taxes_and_fees number Sum of all line item amounts
total_due number Premium + policy fees + total taxes and fees
special_notes string|null State-specific notes or caveats, if any
calculated_at string ISO 8601 timestamp of the calculation

Line Item Codes

Code Name Rate Type Description
sl_taxSurplus Lines TaxpercentagePrimary state surplus lines tax
stamping_feeStamping FeepercentageStamping office processing fee
fire_marshalFire Marshal TaxpercentageState fire marshal assessment
figaFIGA AssessmentpercentageGuaranty association assessment
service_feeService FeepercentageState service/processing fee
surchargeState SurchargepercentageAdditional state surcharge
regulatory_feeRegulatory FeepercentageRegulatory compliance fee
slas_feeSLAS/Clearinghouse FeepercentageClearinghouse or SLAS fee
municipal_taxMunicipal TaxpercentageCity or local jurisdiction tax
flat_feeFiling FeeflatFixed dollar filing fee

Not all codes appear for every state. The response only includes line items applicable to the requested state.

Response Format

All responses use a consistent JSON envelope with success, data/error, and meta fields.

Success Response

Success envelope
{
  "success": true,
  "data": { /* endpoint-specific data */ },
  "meta": {
    "timestamp": "2026-02-26T15:30:45Z",
    "request_id": "req_a1b2c3d4e5f6",
    "response_time_ms": 45
  }
}

Error Response

Error envelope
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Validation failed",
    "details": { /* field-level errors when applicable */ }
  },
  "meta": { /* same as success */ }
}

Meta Object

FieldDescription
timestampISO 8601 timestamp of the response
request_idUnique request identifier for debugging. Include this in support requests.
response_time_msServer-side processing time in milliseconds

Error Codes

HTTP StatusError CodeDescription
400BAD_REQUESTMalformed request or invalid state code
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENTax Calculator feature not enabled for your plan
404NOT_FOUNDEndpoint not found
405METHOD_NOT_ALLOWEDWrong HTTP method (e.g., GET on POST-only endpoint)
422VALIDATION_ERRORRequest parameters failed validation. Check details.fields.
429RATE_LIMIT_EXCEEDEDToo many requests. Retry after the period in the response.
500INTERNAL_ERRORUnexpected server error. Contact support with request_id.

Validation Error Example

422 Validation Error
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Validation failed",
    "details": {
      "fields": {
        "state": ["must be exactly 2 characters"],
        "premium": ["must be greater than 0.01"]
      }
    }
  }
}

Rate Limits

API requests are rate-limited per API key on a per-hour basis. Limits vary by plan tier.

Response Headers

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per hour
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the limit resets

Limits by Plan

PlanRequests / Hour
Professional500
Enterprise5,000
Best practice: Cache results when the same state + premium + fees combination is requested repeatedly.

State-Specific Rules

Each state has unique tax rules that the API handles automatically. Here are the key concepts:

Tax Base Composition

Some states include policy fees in the tax base; others tax only the premium. The API determines this automatically based on the state — you just provide both values.

The API automatically determines whether policy fees are included in the tax base for each state — just provide both premium and policy_fees values.

Rounding Rules

RuleBehaviorExample
standardRound to nearest cent$1,515.456 → $1,515.46
whole_dollarRound to whole dollar$1,515.456 → $1,515.00
no_roundingFull precision (5 decimals)$1,515.45600

Complexity Spectrum

States range from simple (1-2 line items) to complex (5+ fees). Two examples:

Wyoming (Simple)
  • Surplus Lines Tax: 3.0%
Florida (Complex)
  • Surplus Lines Tax: 4.94%
  • Stamping Fee: 0.06%
  • Fire Marshal Tax: 1.0% (fire/allied lines)
  • FIGA Assessment: 0.5%
  • Service Fee: 0.1%
  • Municipal Tax (if applicable)

Code Examples

cURL
curl -X POST https://api.sltax360.com/api/v1/calculator/estimate \
  -H "Authorization: Bearer sltax_t2_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "FL",
    "premium": 75000,
    "policy_fees": 250,
    "effective_date": "2026-03-01"
  }'
JavaScript (fetch)
const response = await fetch('https://api.sltax360.com/api/v1/calculator/estimate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sltax_t2_your_api_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    state: 'FL',
    premium: 75000,
    policy_fees: 250,
    effective_date: '2026-03-01',
  }),
});

const result = await response.json();

if (result.success) {
  console.log('Total due:', result.data.total_due);
  result.data.line_items.forEach(item =>
    console.log(`  ${item.name}: $${item.amount}`)
  );
} else {
  console.error('Error:', result.error.message);
}
Python (requests)
import requests

response = requests.post(
    "https://api.sltax360.com/api/v1/calculator/estimate",
    headers={
        "Authorization": "Bearer sltax_t2_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "state": "FL",
        "premium": 75000,
        "policy_fees": 250,
        "effective_date": "2026-03-01",
    },
)

result = response.json()

if result["success"]:
    data = result["data"]
    print(f"Total due: ${data['total_due']:,.2f}")
    for item in data["line_items"]:
        print(f"  {item['name']}: ${item['amount']:,.2f}")
else:
    print(f"Error: {result['error']['message']}")

Getting Started

1
Get API Key

Contact us to receive your API credentials

2
Test Calculator

Try the free online calculator first

3
First API Call

Use the Quick Start example above

4
Integrate

Use code examples in your language

Need help? Email us at support@sltax360.com with your request_id for fastest resolution.