> ## Documentation Index
> Fetch the complete documentation index at: https://docs.centsless.org/llms.txt
> Use this file to discover all available pages before exploring further.

# How jurisdiction resolution works

> Centsless resolves the correct rounding rule for any U.S. location using a hierarchical cascade: city, county, state, then federal default.

The Centsless engine resolves the correct rounding rule for any merchant location using a hierarchical cascade: city, county, state, then federal default. This ensures that if a city or county enacts a more specific rule than the state, the most local rule applies. You do not need to manage this logic yourself — the engine handles the full resolution chain automatically.

## Resolution cascade

When you submit a transaction or a standalone lookup, the engine checks each level in order and returns the first match:

```
ZIP Code (85001)
  -> City (Phoenix)
    -> County (Maricopa)
      -> State (Arizona)
        -> Federal (default)
```

## Three integration paths

### Path 1: ZIP code (recommended)

Send the merchant's ZIP code. The engine resolves the full location chain automatically using a Census database of 33,791 U.S. ZIP codes — no address parsing required on your side.

```json theme={null}
{
  "merchant_id": "MERCHANT-001",
  "subtotal_cents": 523,
  "tax_total_cents": 200,
  "payment_method": "cash",
  "zip_code": "85001"
}
```

### Path 2: State, county, and city

Send the location components directly. Use this path when your POS already has structured address data and you want explicit control over the resolution inputs.

```json theme={null}
{
  "merchant_id": "MERCHANT-001",
  "subtotal_cents": 523,
  "tax_total_cents": 200,
  "payment_method": "cash",
  "state": "AZ",
  "county": "Maricopa",
  "city": "Phoenix"
}
```

### Path 3: Explicit override

Send the rounding mode and jurisdiction directly. Use this path for testing, development, and edge case handling where you need to force a specific rounding behavior regardless of the merchant's location.

```json theme={null}
{
  "merchant_id": "MERCHANT-001",
  "subtotal_cents": 523,
  "tax_total_cents": 200,
  "payment_method": "cash",
  "cash_rounding_mode": "swedish_rounding",
  "jurisdiction": "US-AZ"
}
```

## Standalone ZIP lookup

You can resolve a ZIP code without processing a transaction. This is useful for pre-validating a merchant location at onboarding time or displaying compliance information in your POS UI.

```bash theme={null}
curl https://api.centsless.org/api/v1/jurisdiction/zip/85001 \
  -H "x-api-key: YOUR_API_KEY"
```

The response includes the full resolution chain: state, county, city, rounding mode, enforcement level, and legislation reference.

## Coverage

The jurisdiction database currently covers:

* **33,791 ZIP codes** mapped to state, county, and city
* **6 enacted states** with active rounding legislation
* **55+ bills tracked** across 35+ states with pending or proposed legislation
* **Automatic updates** when new legislation is enacted

<Note>
  You do not need to redeploy or update your integration when new state legislation is enacted. The jurisdiction database updates automatically, and all in-flight transactions immediately reflect the new rules.
</Note>
