Run your first calculation

The 'hello world' of TaxLens. We'll calculate tax for one stay two ways — in the dashboard and from code — so you can see they return the same itemized result.

The stay we'll price

We'll price a simple stay: three nights in Rome at €200 per night, in a hotel. A calculation needs just two things — where the stay is (a jurisdiction code like IT-RM-ROM, or coordinates) and what the stay is (date, nights, nightly rate, currency, and optional details that let more specific rules fire).

Detail
Calculating tax never saves anything. It's a pure, read-only computation — you only create a record when you turn a calculation into a booking.

In the dashboard

The fastest way to see it is the built-in Calculator. Pick a preset or edit the inputs below — this is the real engine, running against your live session and active organization. Nothing is saved.

Live calculatorRuns against your session · nothing saved
Sign in to calculate

Pick a preset or enter a stay, then Calculate.

The result is an itemized breakdown: one component per tax (its name, category, rate, taxable base, amount, and the jurisdiction it came from), plus the total and effective rate. For Rome you'll see Italy's 10% VAT charged on the room, plus a separate, guest-borne Rome tourist tax (a per-person-per-night flat that sits outside the VAT base) — two components that add into the total. That's additive stacking in action.

Via the API

The same calculation from code is a single POST to /v1/tax/calculate. Authenticate with your API key, send the stay as JSON, and read back the breakdown.

curl https://api.taxlens.getdynamiq.ai/v1/tax/calculate \
  -H "X-API-Key: $TAXLENS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jurisdiction_code": "IT-RM-ROM",
    "stay_date": "2026-07-01",
    "nights": 3,
    "nightly_rate": 200,
    "currency": "EUR",
    "property_type": "hotel"
  }'
Tip
Exact figures depend on the rates in force for your stay date — calculations are time-aware, so a future stay uses future rates already on file. The shape, though, is always this: a list of components that stack into a total.

Run it live

Here's the same call wired to run against your own session, right from the docs. It's read-only — nothing is saved.

POST/v1/tax/calculate
Sign in to run

Three nights in Rome — the same stay, executed against your live session.

Request body
{
  "jurisdiction_code": "IT-RM-ROM",
  "stay_date": "2026-07-01",
  "nights": 3,
  "nightly_rate": 200,
  "currency": "EUR",
  "property_type": "hotel"
}

Sign in to run this against the live API. Read-only — nothing is saved.

Where to go next