FASTagJi Developer API · v1

Power your applications with FASTagJi Toll APIs

Integrate Indian highway toll calculation into your application with a REST API. Work out route-based toll charges, identify the toll plazas along a route, and get vehicle-specific toll pricing — either from waypoints we route for you, or from a route you already have.

Endpoints
5
Vehicle classes
7
Coverage
India
Format
REST · JSON
POST /api/v1/developer/toll/calculate-polyline
{
  "waypoints": [
    { "lat": 13.0827, "lng": 80.2707 },
    { "lat": 12.9716, "lng": 77.5946 }
  ],
  "vehicle_type": "car",
  "trip_type": "single"
}
200 OK Response
{
  "success": true,
  "data": {
    "route": { "distance_km": 315.7, … },
    "plazas": [ … ],
    "totals": {
      "plaza_count": 5,
      "toll_fare": 500,
      "currency": "INR",
      "unpriced_plazas": 0,
      "complete": true
    }
  }
}

Field names and structure are exact, and the figures come from real plaza rows on this corridor. Run the request with your own key for live rates.

Subscription Plans & Pricing

Transparent Pricing For Every Fleet & Application

Select the ideal plan for your developer integration. Flexible Prepaid Balance Packages with per-call paise billing and 30-day validity. All new accounts can claim a free 14-day trial pack.

14-Day Trial

Trial Pack

Free daily transaction limit, 14 days, to build and test an integration. No credit card required.

₹0 /14 days
  • ✓ 25 txns/day (Individual)
  • ✓ 150 txns/day (Business)
  • ✓ No credit card required
  • ✓ 14 days validity
  • ✓ 10 req / min limit
  • ✓ 4 max waypoints
  • ✓ 1 active API key

Starter Pack

₹6,000 of calls, valid 30 days. Around 4,800 waypoint routes.

₹6,000 /30 days (ex-GST)
  • ✓ ₹6,000 call balance
  • ✓ 30 days validity
  • ✓ ₹3.50/call – Toll from a polyline
  • ✓ ₹1.25/call – Toll by waypoints
  • ✓ 60 req / min limit
  • ✓ 4 max waypoints
  • ✓ 2 active API keys

Standard Pack

₹75,000 of calls, valid 30 days. Around 100,000 waypoint routes.

₹75,000 /30 days (ex-GST)
  • ✓ ₹75,000 call balance
  • ✓ 30 days validity
  • ✓ ₹2.25/call – Toll from a polyline
  • ✓ ₹0.75/call – Toll by waypoints
  • ✓ 600 req / min limit
  • ✓ 10 max waypoints
  • ✓ 5 active API keys

Corporate Pack

₹3,00,000 of calls, valid 30 days. Unlimited waypoints.

₹300,000 /30 days (ex-GST)
  • ✓ ₹300,000 call balance
  • ✓ 30 days validity
  • ✓ ₹1.80/call – Toll from a polyline
  • ✓ ₹0.60/call – Toll by waypoints
  • ✓ 1200 req / min limit
  • ✓ Up to 10 waypoints
  • ✓ 10 active API keys
Looking for full comparison tables & FAQ? View Dedicated Pricing Page →

Why FASTagJi Toll APIs?

Built on our own NHAI and NETC toll data, for Indian roads specifically.

  • Route-based toll calculation

    Send waypoints and get the toll charge for the whole journey, plaza by plaza.

  • Toll plaza identification

    Every plaza on the route, in travel order, with coordinates, NH number and plaza code.

  • Your own route, priced

    Already using Google Maps, Mapbox or HERE? Send that polyline and we price the road you are actually on.

  • Vehicle-specific pricing

    Seven classes, from car to 7+ axle, each mapped to its NETC class and published rate.

  • Indian toll information

    NHAI plaza rates with their revision dates, plus closed-loop entry and exit fares.

  • REST and JSON

    One envelope on every endpoint, success or failure. Write your error branch once.

  • Usage monitoring

    Quota and rate-limit headers on every response, plus endpoints for your account and daily usage.

  • Honest totals

    A plaza with no published rate reports null and is counted, never silently charged as zero.

Getting started

A REST API over HTTPS. JSON in, JSON out, one envelope on every reply. You can be making real calls in about five minutes.

Base URL

v1 https://fastagji.in/api/v1/developer

The version is in the path. Within v1 we will not remove a field, rename one, or change its type, and we will not rename an error.code. New fields may appear, so treat an unknown field as something to ignore rather than an error — otherwise a routine addition on our side breaks your client. Anything that cannot be done under those rules goes to a v2 path and v1 keeps working.

Getting an API key

Self-service registration. Select a subscription plan below to register your developer account. Provide your name, email, and mobile number to register.

14-day trial

Trial Pack

Free daily transaction limit, 14 days, to build and test an integration. No credit card required.

₹0 /14 days
  • ✓ 25 txns/day (Individual)
  • ✓ 150 txns/day (Business)
  • ✓ 14 days validity
  • ✓ No credit card required
  • ✓ 10 req / minute
  • ✓ 4 max waypoints
  • ✓ 1 API key
Prepaid Pack

Starter Pack

₹6,000 of calls, valid 30 days. Around 4,800 waypoint routes.

₹6,000 /30 days (ex-GST)
  • ✓ ₹6,000 call balance
  • ✓ 30 days validity
  • ✓ ₹3.50/call – Toll from a polyline
  • ✓ ₹1.25/call – Toll by waypoints
  • ✓ 60 req / minute
  • ✓ 4 max waypoints
  • ✓ 2 API keys
Prepaid Pack

Standard Pack

₹75,000 of calls, valid 30 days. Around 100,000 waypoint routes.

₹75,000 /30 days (ex-GST)
  • ✓ ₹75,000 call balance
  • ✓ 30 days validity
  • ✓ ₹2.25/call – Toll from a polyline
  • ✓ ₹0.75/call – Toll by waypoints
  • ✓ 600 req / minute
  • ✓ 10 max waypoints
  • ✓ 5 API keys
Prepaid Pack

Corporate Pack

₹3,00,000 of calls, valid 30 days. Unlimited waypoints.

₹300,000 /30 days (ex-GST)
  • ✓ ₹300,000 call balance
  • ✓ 30 days validity
  • ✓ ₹1.80/call – Toll from a polyline
  • ✓ ₹0.60/call – Toll by waypoints
  • ✓ 1,200 req / minute
  • ✓ Up to 10 waypoints
  • ✓ 10 API keys

A key is shown to you once, at the moment it is issued. We store only a SHA-256 hash of it, so it cannot be read back later by you or by us. Put it in your secret store straight away. Lost keys are revoked and replaced, not recovered.

Your first call

Start with the vehicle types endpoint. It costs no credits, so it is a safe way to confirm your key and your headers are right before you spend anything.

curl -s https://fastagji.in/api/v1/developer/toll/vehicle-types \
  -H "Authorization: Bearer $FASTAGJI_API_KEY"

A 200 with "success": true means you are authenticated. A 401 means the key was not recognised — check you copied all of it, including the fgj_live_ or fgj_test_ prefix.

The shape of an integration

Four steps to integrate the FASTagJi Toll API Register via self-service, send an authenticated POST request, read the success or error envelope, then watch the quota and rate-limit headers. 1 Register Self-service account 2 Send a request POST with your key 3 Read the envelope success true or false 4 Watch the headers Quota and rate limit

The response envelope

Every response has the same outer shape, success or failure, on every endpoint. Branch on success and you have handled all of them.

{
  "success": true,
  "data": { },
  "meta": {
    "request_id": "a23e363c-bf36-4323-a608-47fbc3cf7fda",
    "generated_at": "2026-11-09T09:02:58+00:00",
    "credits_used": 1
  }
}
  • data on success, error on failure. Never both.
  • error.code is the stable machine-readable value. Branch on it, not on error.message, which may be reworded.
  • error.details names each field that was rejected and why. It is present on validation_failed and may be absent otherwise.
  • meta.request_id is on every response. It is the identifier of your call in our logs — quote it when reporting anything.

Conventions worth knowing up front

ConventionWhat it means
null against 0 null means unknown or unlimited. 0 means zero. They are never interchangeable — a null fare is a missing rate, not a free plaza.
Currency All money is Indian rupees. Fares are whole rupees; currency is returned alongside so you need not assume.
Coordinates Request bodies use named lat and lng. GeoJSON geometry, in and out, is [longitude, latitude] as the specification requires.
Timestamps ISO 8601 with an offset. Dates without a time are YYYY-MM-DD.
Coverage India only. A route outside the country is refused rather than returned with a total of zero.

Authentication

Every endpoint under /api/v1/developer needs a key. There is no anonymous access and no public tier.

Sending the key

Preferred:

Authorization header
Authorization: Bearer fgj_live_XXXXXXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

If your tooling reserves the Authorization header, use:

X-API-Key header
X-API-Key: fgj_live_XXXXXXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

Authorization wins if you send both. Nothing else is accepted — not a query parameter, not a cookie, not a form field. A key in a URL ends up in access logs, browser history and referrer headers, which is how keys leak.

What a key looks like

The four parts of a FastagJi API key A key reads fgj, then live or test, then a twelve-character non-secret lookup prefix, then a forty-character secret. Only the secret must be protected. fgj_live_XXXXXXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY fgj — Always present live / test — Which environment Prefix, 12 chars — Not secret — quote it in a ticket Secret, 40 chars — Never share, never log, never commit
The prefix is how we find your key's row; the secret is what proves the key is yours. The characters above are placeholders, not a real key.

fgj_test_… keys are for your own development and staging. They are authenticated and metered exactly like live keys and return exactly the same fares — the environment is a label for your own benefit, not a sandbox with different data. Plan your test traffic accordingly.

The key is shown once

We store a SHA-256 hash of your key, its prefix, and its last four characters. We do not store the key. Nobody at FastagJi can look it up, read it back or email it to you, and no amount of escalation changes that — the information is not there. Put it in your secret store the moment you receive it.

Rotating without downtime

Every paid tier allows more than one active key, so you can change keys with no interruption:

  1. Ask us to issue a second key.
  2. Deploy it alongside the first.
  3. Confirm traffic is flowing on the new key — GET /me reports key.last_used_at for whichever key you called it with.
  4. Ask us to revoke the old one.

A revocation takes effect on the next request, with no grace period. That is the point: it is what you run when a key has leaked.

Why a request can be refused

Status error.code Meaning What to do
401 invalid_key No key was sent, or the key is not recognised. Send the key as Authorization: Bearer, or as X-API-Key. Check it was copied in full.
403 revoked_key This key was revoked. The message carries the date. Use a current key, or ask us to issue one.
403 expired_key This key passed its expiry date. Rotate the key before the expiry date next time.
403 inactive_developer The account is not active, so none of its keys work. Contact us. This is an account state, not a key problem.

401 means we do not know who you are. 403 means we know, and the answer is no. Retrying helps with neither, so keep them out of a retry loop — fix the credential or talk to us.

Protecting your key

  • Server-side only. A key in a mobile app or a web page is a published key, however it is obfuscated; anyone can read it out of the bundle or the network tab.
  • Out of source control, and out of CI logs.
  • One key per environment, so revoking one does not take down the others.
  • Rotate if a key has ever been pasted into a chat, a ticket or a screenshot.

A key identifies your account, not its own allowance. Plan, quota and limits live on the account's subscription and are shared by all of its keys: two keys on one account draw down one allowance.

Toll calculation · 1 of 2

Toll Calculation — Waypoints

You send the places. We work out the driving route between them, find the toll plazas on it, and price each one for your vehicle class.

POST https://fastagji.in/api/v1/developer/toll/calculate-polyline 1 credit per route Key required

How it works

How the waypoint endpoint produces a toll total Your waypoints go to our routing step, which produces a route line. We then find every toll plaza within two kilometres of that line, price each one for the vehicle class, and return the plazas in travel order with the route geometry and the total. Your request
2–10 waypoints
We route it
The driving route between them
Plaza matching
Within 0.5 km of the line
Pricing
Vehicle class and trip type
Response
Plazas, geometry, total
FastagJi does the routing Waypoints are stops, not hints: three waypoints means the route actually passes through the middle one. You get the best route back. Ask for alternatives and every road is priced, with the fastest, cheapest and shortest named.

Request

{
  "waypoints": [
    {"lat": 13.0827, "lng": 80.2707, "address": "Chennai"},
    {"lat": 12.9716, "lng": 77.5946, "address": "Bengaluru"}
  ],
  "vehicle_type": "car",
  "trip_type": "single"
}

Parameters

Field Type Required Notes
waypoints array Required Two or more, in travel order. The ceiling is 10, and your plan may set it lower — read limits.max_waypoints from GET /me.
waypoints[].lat number Required −90 to 90.
waypoints[].lng number Required −180 to 180.
waypoints[].address string Optional Up to 500 characters. Echoed back on the leg; never used for routing.
vehicle_type string Optional Defaults to car. One of car, lcv, bus, multiaxle, four_six_axle, seven_more_axle, hcm_eme — see vehicle types.
trip_type string Optional single or return . Defaults to single.
alternatives boolean Optional Defaults to false. true prices every road the router offers and adds the alternatives block — see route alternatives. Costs one credit per route returned.

trip_type: "return" is not twice the single fare. Most plazas publish a separate, cheaper return rate valid for 24 hours, and that is the column we read. It affects fares only — the distance and duration returned are still one way.

Response

The same worked example, shown as a reader sees it, as the JSON your client parses, and on a map.

Distance
315.7 km
Duration
5h 23m
Toll plazas
5
Toll total
₹500
  • Sriperumbadur NH 48 · 35.7 km ₹50
  • Chennasamaduram NH 48 · 97.8 km ₹160
  • Pallikonda Toll Plaza NH 48 · 146.6 km ₹115
  • Vaniyambadi Toll Plaza NH 48 · 195.8 km ₹110
  • Electronic City Phase 1 Toll Plaza NH 7 (New 44) · 299.7 km ₹65

totals.complete is true, so every plaza on this route has a published rate and the total is the fare.

Worked example. The plaza names, NETC codes, NH numbers, coordinates and car rates above are real rows from our toll data for this corridor, and the field names and structure are exactly what the API returns. The distances are measured along the 13-point sample line used throughout this page, so they read a little short of the road itself — a routed response follows the carriageway and comes back longer. The duration is illustrative. Run the call with your own key for live figures.

Reading totals

FieldMeaning
plaza_countPlazas on the route, including those inside closed-loop stretches.
closed_loop_groupsHow many closed-loop stretches were priced as an entry/exit pair.
toll_fareThe total. Each closed-loop stretch counted once; unpriced plazas not counted at all.
unpriced_plazasPlazas with no published rate for this vehicle class.
completefalse whenever unpriced_plazas is above zero.

complete: false means toll_fare is a floor, not the fare. Show it as an estimate, or say how many plazas are missing. Presenting an incomplete total as the price is how a customer ends up short at a barrier.

Reading plazas[]

FieldMeaning
idOur plaza id. Stable — use it as your join key.
codeThe NETC plaza code, where we have one. May be null.
nh_noThe highway the plaza sits on, as published.
distance_from_start_kmDistance along the route to this plaza, from the first waypoint.
leg_indexWhich leg it falls on, zero-based.
fare.amountWhat this plaza charges. null means no rate on file, or the plaza belongs to a closed-loop stretch.
fare.basisflat, closed_loop or unavailable.
fare.estimatedtrue when the fare was derived rather than published — a return journey on a pair that publishes only a single fare, doubled.
fare.rate_revisionWhen the rate we used was published.
closed_loopThe stretch this plaza belongs to, or null.
is_closed_loop_plazaWhether the plaza itself operates entry and exit.

Closed-loop stretches

On a closed-loop corridor you are charged once for the distance between where you entered and where you left, not at each barrier. Every plaza in such a stretch shares a closed_loop.group and carries the same group_fare, and each one's own fare.amount is null.

How a closed-loop stretch is priced Three plazas in one closed-loop group each report a null fare. The charge for the whole stretch, 180 rupees, sits once on closed_loop.group_fare. Summing fare.amount across the plazas gives the correct total; summing group_fare per plaza would charge 540. closed_loop.group = 1 1 Entry plaza fare.amount: null 2 Mid-corridor plaza fare.amount: null 3 Exit plaza fare.amount: null group_fare: 180 Charged once, for the stretch Correct: sum fare.amount, ignore the nulls → 180 once, from totals.toll_fare Wrong: add group_fare per plaza → 540 for a stretch that costs 180

To list fares per stop, show fare.amount and render the stretch as one line item from its group_fare. Do not add group_fare for each member. totals.toll_fare already counts each group once; if you need your own total, sum fare.amount and ignore the nulls.

Route alternatives

There is usually more than one road between two places, and the quickest one is not always the cheapest. Send alternatives: true and every road the router offers is priced separately, with its own plazas and its own total, and the response says which is the fastest, which is the cheapest and which is the shortest.

These are the same three rules our own Toll Calculator uses, so the API and the public page answer the same way for the same journey.

{
  "waypoints": [
    {"lat": 13.0827, "lng": 80.2707, "address": "Chennai"},
    {"lat": 12.9716, "lng": 77.5946, "address": "Bengaluru"}
  ],
  "vehicle_type": "car",
  "alternatives": true
}

Nothing that was already there moves. route, plazas and totals still describe the best route, exactly as they do without the flag, and alternatives is added beside them. Leave the flag out and the response has no new key at all.

FieldMeaning
countHow many roads were priced. At most 3, which is the router's own ceiling.
noteWhy there is only one route, when there is only one. null when there is a real comparison to read.
comparisonOne index per label, plus what the cheapest road saves and what that saving costs. null for a single route.
routes[].indexPosition in the router's own order, best first. routes[0] is the same road as route.
routes[].labelsWhich of fastest, cheapest, shortest this road wins. May hold several; may be empty.
routes[].toll_fareThis road's own total, each closed-loop stretch counted once.
routes[].polylineGeoJSON LineString, the same shape as route.polyline.
routes[].plazasThe plazas on this road, the same shape as the top-level plazas.
comparison.all_routes_pricedfalse when any compared road has a plaza with no published rate.

How the three labels are decided

LabelMeans
fastestThe lowest duration_seconds.
cheapestThe lowest toll_fare.
shortestThe lowest distance_km.

Two things to expect. A road can win more than one label, so if one road is both quickest and cheapest its labels holds both — do not assume one label per road. And every tie is labelled: two roads that both cost ₹315 are both the cheapest. When you need to name a single winner, read comparison.cheapest_index, which is the first of them. A road that wins nothing has labels: [], which is an answer rather than a gap.

all_routes_priced: false makes the price ranking provisional. An unpriced plaza contributes nothing to a total, so a road with a gap in its rates can come out as the cheapest while actually costing more than a fully priced one. The ranking is still the best answer published rates allow — but before you show a driver "save ₹120 this way", check all_routes_priced, or check each road's own complete.

Asking does not guarantee getting. Alternatives need a straight origin-to-destination journey — the router does not offer them for a route with via stops — and some roads genuinely have no second option. Either way count is 1, comparison is null, labels is empty because "fastest of one" says nothing, note says which case it was, and you are charged one credit, not three. You are never billed for options the router could not offer.

Credits follow the work: one per road in routes, because three roads is three plaza scans and three pricing passes. meta.credits_used is the figure that reaches your usage and your invoice. Quota is separate — the call counts once against your plan's monthly allowance however many roads come back.

Errors on this endpoint

Statuserror.codeWhy
401 invalid_key No key was sent, or the key is not recognised.
403 revoked_key This key was revoked. The message carries the date.
403 expired_key This key passed its expiry date.
403 inactive_developer The account is not active, so none of its keys work.
403 origin_not_allowed The key was used from a browser origin that is not registered for it.
403 feature_unavailable Your package does not include the API you called.
422 validation_failed The request could not be used. error.details names each field.
429 rate_limited Too many requests this minute for your plan.
429 quota_exceeded This period's call allowance is used up.
502 upstream_error Routing could not answer: no road between the points, or the routing service is unhappy. Waypoint endpoint only.
500 server_error We failed. Nothing from the exception is returned.

A 422 for too many waypoints is a plan limit rather than a bug — read limits.max_waypoints from GET /me. The full list of codes is in error codes.

alternatives has to be a boolean, or one of the forms we read as one — true, false, 1, 0, "1", "0". Anything else is a 422 rather than a silent true: a truthy string would switch the feature on and charge for it.

How the numbers are produced

  • Plazas are matched within 0.5 km of the route line, so a plaza on a parallel service road or a nearby junction can be picked up. Check lat, lng and distance_from_start_km if one looks out of place, and send us the request_id if it is wrong.
  • A plaza is reported once per journey even if the route passes it twice.
  • distance_km and duration_seconds describe free-flowing traffic. They are not a live ETA and carry no traffic data.
  • Fares come from published NHAI and NETC rate cards. rate_revision says which revision. Rates change, typically on 1 April.
  • Two calls with the same waypoints can return slightly different geometry if the routing graph has been updated. The plazas and fares do not drift for that reason alone.
  • With alternatives: true each road is priced on its own — its own plaza scan, its own closed-loop grouping. A plaza matched on one road has no effect on another, so every total stands by itself.
  • The order of routes is the router's, best first. It is not sorted by price, distance or time; labels and comparison are what tell you that.

Toll calculation · 2 of 2

Toll Calculation — Your Own Route

You already have a route — from Google Maps, Mapbox, HERE, OSRM or your own router. Send it, and get the toll plazas on that exact road.

POST https://fastagji.in/api/v1/developer/toll/calculate-from-polyline 1 credit Key required

We do not route your geometry again. We do not look for a cheaper alternative, and we do not move a point. The line you send is the line we price. This endpoint makes no call to any routing service at all, which is asserted by a test rather than only stated here.

Which endpoint do I want?

Waypoints Your own route
You send2–10 waypointsA complete route line
We route itYesNo
Road pricedThe one we pickedThe one you sent
Duration returnedMeasurednull, unless you send one
legs arrayYes, one per pair of waypointsAbsent — a supplied line is one route
Possible 502Yes, if routing failsNo, nothing to fail
Credits11

If you already pay a mapping provider for routing, use this endpoint. The tolls then belong to the road your driver is actually on, and you are not paying twice to have the route calculated. If you have two places and no route, use the waypoint endpoint.

How it works

How the supplied-route endpoint produces a toll total Your provider's route line is decoded at the precision you declare, gaps between your points are filled in, plazas are matched against that geometry, each is priced, and the response returns your own line back unchanged. There is no routing step. Your route line
From your map provider
Decode
At the format you declare
Fill the gaps
Your points all kept
Match and price
Against your geometry
Response
Your line, returned as sent
No routing step. No alternative route. No point moved. Asserted by a test that fails if any outbound HTTP call is made. Filling the gaps adds points between yours so a plaza mid-way along a long straight stretch is still found. Your own points are never removed or moved. The same road returns the same fare whether you send 3 points or 1,200. route.polyline in the response is your geometry, returned as you sent it — not our filled version.

Request

{
  "polyline": "{eznA{z|hNjtHrpp@j~HrkHbfGros@ztDnjy@{w@~}s@vwAjya@fqWrkf@ftXzp_@wdCrquAotLnp{@_sSzw^orWjeM",
  "format": "google5",
  "vehicle_type": "car",
  "trip_type": "single"
}

The encoded string above is a genuine Google-precision-5 polyline of the 13-point Chennai to Bengaluru line used throughout this page. You can paste it straight into the playground.

Parameters

FieldTypeRequiredNotes
polyline string or array Required The encoded string, or a GeoJSON LineString, a Feature wrapping one, or a bare [[lng, lat], …] array.
format string For a string google5, google6, geojson . Required when polyline is a string; optional when it is an array, because an array can only be GeoJSON.
vehicle_type string Optional Defaults to car. Same values as the waypoint endpoint.
trip_type string Optional single or return. Defaults to single.
duration_seconds integer Optional Your router's own travel time. Echoed back untouched, and used to fill duration_text. Omit it and both are null.
proximity_meters integer Optional Plaza search radius. Defaults to 500; minimum 50, maximum 10,000.

Supported formats

formatWhat it isWho emits itNotes
google5 Google Encoded Polyline, precision 5 Google Directions, and most providers The common default. This is what overview_polyline contains.
google6 Encoded Polyline, precision 6 Mapbox and Valhalla, when asked The same algorithm at a finer scale. Must be declared: read as precision 5 it decodes elsewhere.
geojson GeoJSON LineString Anything, including our own responses A LineString, a Feature wrapping one, or a bare [[lng, lat], …] array. Order is longitude first.

HERE Flexible Polyline is a different encoding and is not supported yet. Convert it to GeoJSON, or ask HERE for an encoded polyline.

Why you must declare the format

Why the polyline precision must be declared Precision 5 and precision 6 are the same bytes read at different scales. Reading precision 6 as precision 5 multiplies the route by ten and it leaves the globe, so it is refused immediately. Reading precision 5 as precision 6 divides it by ten; every coordinate is still legal and the route lands in the Gulf of Guinea, where there are no Indian toll plazas. The coverage check catches that case. Same bytes _p~iF~ps|U… Precision 6 read as precision 5 → multiplied by ten → off the globe Refused immediately with a 422. Loud, and easy to diagnose. Precision 5 read as precision 6 → divided by ten → Gulf of Guinea Every coordinate is still legal. Nothing looks broken; there are simply no tolls. So we ask rather than guess — and check the decoded route falls inside India (5.5–38°N, 66.5–98.5°E). That check catches the quiet case above, and a swapped [lat, lng] pair, which lands outside the country too.

GeoJSON coordinate order

[longitude, latitude], as the GeoJSON specification requires — the same order our own responses use. Sending [latitude, longitude] is the most common mistake there is. For Indian routes it is caught, because the swapped pair lands outside the area we hold data for.

How simplified can the line be?

As simplified as your provider gives you. A two-point line works. Google's overview_polyline works with no special handling. Your own points are all kept; we only add points between them, closely enough spaced that a plaza in the middle of a long straight stretch is still found.

The same road returns the same fare whether you send 3 points or 1,200. Your toll bill does not depend on how hard your map provider simplified the line. There is a test that prices one road at 3, 12, 200 and 1,200 points and fails if the totals differ.

Limits

LimitValue
Encoded string length400,000 characters
Points after decoding40,000
Minimum points2 distinct
Search radius50 m to 10,000 m, default 500 m

Consecutive duplicate points are dropped before the count is taken.

Response

Identical in shape to the waypoint endpoint for plazas and totals, so one parser serves both. The route block differs, and there is no legs array.

Distance
315.7 km
Duration
null
Toll plazas
5
Toll total
₹500
  • Sriperumbadur NH 48 · 35.7 km ₹50
  • Chennasamaduram NH 48 · 97.8 km ₹160
  • Pallikonda Toll Plaza NH 48 · 146.6 km ₹115
  • Vaniyambadi Toll Plaza NH 48 · 195.8 km ₹110
  • Electronic City Phase 1 Toll Plaza NH 7 (New 44) · 299.7 km ₹65

totals.complete is true, so every plaza on this route has a published rate and the total is the fare.

Worked example. Plaza names, NETC codes, NH numbers, coordinates and car rates are real rows from our toll data, and field names and structure are exactly what the API returns. The distances are measured along the sample line by the same great-circle sum the endpoint uses — open the playground and press Validate and decode to watch your own browser arrive at the same 315.7 km.

The route block

FieldMeaning
sourceAlways "customer_provided" on this endpoint. Useful if you log both endpoints into one table.
formatThe format we decoded, echoed back.
points_suppliedHow many distinct points your line had after consecutive duplicates were dropped.
distance_kmMeasured along your geometry, not along a route we chose.
distance_basisA sentence saying exactly that, so it is visible in a logged response.
duration_secondsnull unless you sent one. A polyline carries no timing and we will not invent a travel time.
duration_textFormatted from duration_seconds, so also null when you send none.
polyline.geojsonYour line, as you sent it.

Errors on this endpoint

Statuserror.codeWhy
401 invalid_key No key was sent, or the key is not recognised.
403 revoked_key This key was revoked. The message carries the date.
403 expired_key This key passed its expiry date.
403 inactive_developer The account is not active, so none of its keys work.
403 origin_not_allowed The key was used from a browser origin that is not registered for it.
403 feature_unavailable Your package does not include the API you called.
422 validation_failed The request could not be used. error.details names each field.
429 rate_limited Too many requests this minute for your plan.
429 quota_exceeded This period's call allowance is used up.
500 server_error We failed. Nothing from the exception is returned.

No 502 on this endpoint. A 502 means a routing service failed, and this one calls none.

What a 422 means here

  • No format on a string polyline. Declare it.
  • The string is not a valid encoding — truncated mid-value, or a character outside the alphabet.
  • A decoded point is off the globe. Usually precision 6 sent as google5.
  • Fewer than two distinct points after consecutive duplicates were dropped.
  • The route falls outside India. Also what a swapped [lat, lng] pair, or precision 5 sent as google6, looks like from here.
  • Over a size limit — see the table above.

error.details names the field and the reason in every case, so you do not have to guess which of these it was.

Other available APIs

Three supporting endpoints. None of them costs a credit, which is on purpose: a limit you have to spend quota to inspect cannot be monitored.

Vehicle Types

GET https://fastagji.in/api/v1/developer/toll/vehicle-types Free

The valid values for vehicle_type and trip_type, with their NETC classes. Worth calling once at startup rather than hard-coding the list — if we add a class, your dropdown gets it without a deploy.

curl -s https://fastagji.in/api/v1/developer/toll/vehicle-types \
  -H "Authorization: Bearer $FASTAGJI_API_KEY"

type is what you send. label is for your own UI. netc_class is the official NETC class the fare was looked up under — the value to quote if you are reconciling against a FASTag statement.

Account

GET https://fastagji.in/api/v1/developer/me Free

Everything the API knows about the calling key, in one call: the account, the key you authenticated with, the plan, the subscription period, your enforced limits, your feature flags, and usage so far this period. Useful at startup and in a health check.

curl -s https://fastagji.in/api/v1/developer/me \
  -H "Authorization: Bearer $FASTAGJI_API_KEY"

Reading it

  • key describes the key you authenticated with, not every key on the account. masked is safe to display and to log.
  • limits reflects the terms your subscription was sold on (and for daily trial plans, daily_limit reflects the limit for your Individual or Business account).
  • usage.billing_method is one of daily, balance, or calls. On daily plans, daily_limit, used_today, and remaining_today track today's usage (resetting at midnight), while period_used tracks total calls across the trial window.
  • null in limits means unlimited. 0 means none.
  • features reports what your plan carries. Only max_waypoints is enforced today; the other switches are stored and reported but not yet read by any endpoint.
  • plan and subscription can both be null for an account with no live subscription. Such an account is still served, at a fallback shape, rather than cut off — but limits is then the fallback's, not a plan you bought.

Do not call this before every request. The rate-limit and quota headers on your ordinary responses carry the same running numbers for free.

Usage

GET https://fastagji.in/api/v1/developer/usage Free

The daily rollup, per endpoint. This is the same data your invoice is computed from — not a separate count kept alongside it — so it is the right thing to reconcile against.

ParameterRequiredNotes
fromOptionalA date. Defaults to the start of your billing period.
toOptionalA date, on or after from. Defaults to the end of your billing period.

The range must be 366 days or fewer, otherwise 422 validation_failed.

curl -s "https://fastagji.in/api/v1/developer/usage?from=2026-11-01&to=2026-11-30" \
  -H "Authorization: Bearer $FASTAGJI_API_KEY"
FieldMeaning
callsEvery request, including the free endpoints.
billable_callsRequests that counted against you at all.
errorsRequests that returned 400 or above.
creditsWhat the quota and the invoice are computed from.
average_duration_msMean server time for that day and endpoint.

calls being higher than credits is normal, not a discrepancy: the free endpoints are counted as calls and cost nothing. Reconcile an invoice against credits.

Rows cover the whole account, across all of its keys. A day and endpoint with no traffic has no row rather than a zero row. Per-request detail behind these totals is kept for 90 days and then pruned; the daily totals are kept indefinitely, so an old invoice stays checkable long after the individual calls are gone.

Not here yet. There is no batch endpoint — one route per request — no webhook, and no historical-rate lookup. If one of those is what you need, tell us; it is useful to know what is actually being asked for.

Vehicle types

7 classes. Each maps to the NETC vehicle class the fare is looked up under, and the response tells you which one was used.

vehicle_type Label NETC class
car Car / Jeep / Van VC4
lcv LCV (Light Commercial Vehicle) VC5
bus Bus / Mini-Bus / Truck VC7
multiaxle Multi-Axle (3 axles) VC11
four_six_axle 4–6 Axle Vehicle VC12
seven_more_axle 7+ Axle Vehicle VC15
hcm_eme HCM / EME VC16

Trip types

trip_typeWhat it prices
singleOne journey. The default.
returnThe published return rate, which is usually valid for 24 hours and cheaper than two singles. Where a plaza publishes no return rate, the single is doubled and fare.estimated is true so you can see which it was.

Response structure

One envelope on every endpoint. The headers alongside it carry your running quota and rate-limit numbers, so you rarely need to ask for them.

The meta block

FieldMeaning
request_idA UUID for this call, on every response including errors. It is the identifier in our logs — log it, and quote it when you report anything.
generated_atWhen we produced the response. ISO 8601 with an offset.
credits_usedWhat this call cost. 0 on the free endpoints.

Response headers

HeaderOnMeaning
X-RateLimit-LimitSuccessRequests per minute allowed per API key (burst protection).
X-RateLimit-RemainingSuccessHow many requests are left in the current 60-second window for this key.
X-DailyLimit-LimitDaily trialDaily transaction limit configured for your account type (Individual or Business).
X-DailyLimit-UsedDaily trialBillable transactions used today (across all keys on your account).
X-DailyLimit-RemainingDaily trialBillable transactions remaining today before midnight reset.
X-Balance-LimitBalance packTotal prepaid INR balance granted for the active package.
X-Balance-RemainingBalance packRemaining INR balance after this request.
X-Balance-CurrencyBalance packCurrency code (INR).
X-Quota-LimitDaily / CallsDaily transaction limit (on daily) or period call allowance (on calls). Absent when unmetered.
X-Quota-UsedDaily / CallsBillable transactions used today (on daily) or this period (on calls).
X-Quota-RemainingDaily / CallsBillable transactions remaining today (on daily) or this period (on calls).
X-Quota-OverageOverage only1 when this call was served beyond your included allowance and will be billed at the overage rate.
Retry-After429Seconds to wait when rate_limited. Honour it instead of retrying immediately.

Watch the headers, not the clock. Every successful response tells you where you stand on both limits, so a well-behaved client can pace itself without spending a call on GET /me to ask.

Error codes

Branch on error.code, which is stable within v1. error.message is for a human and may be reworded.

Status error.code Meaning What to do Costs a credit
401 invalid_key No key was sent, or the key is not recognised. Send the key as Authorization: Bearer, or as X-API-Key. Check it was copied in full. No
403 revoked_key This key was revoked. The message carries the date. Use a current key, or ask us to issue one. No
403 expired_key This key passed its expiry date. Rotate the key before the expiry date next time. No
403 inactive_developer The account is not active, so none of its keys work. Contact us. This is an account state, not a key problem. No
403 origin_not_allowed The key was used from a browser origin that is not registered for it. Register the origin against the key, or call the API from your server, which sends no Origin header. No
403 feature_unavailable Your package does not include the API you called. Move to a package that includes it. GET /me reports what yours covers. No
422 validation_failed The request could not be used. error.details names each field. Read error.details. Every entry is a field name and what was wrong with it. Yes
429 rate_limited Too many requests this minute for your plan. Back off using Retry-After. Watch X-RateLimit-Remaining to avoid it. No
429 quota_exceeded This period's call allowance is used up. Wait for the period to roll over, or move to a plan that sells overage. No
404 not_found No endpoint at that path under /api/v1/developer. Check the path against this page. No
502 upstream_error Routing could not answer: no road between the points, or the routing service is unhappy. Waypoint endpoint only. Retry. If it persists, check the waypoints are on reachable roads. No
500 server_error We failed. Nothing from the exception is returned. Retry, then send us the meta.request_id from the response. No

Which errors are worth retrying

RetryCodesHow
Yes rate_limited Wait for Retry-After, then retry. Better still, pace from X-RateLimit-Remaining.
Yes upstream_error, server_error Retry with backoff, a few attempts. Neither costs a credit, so a retry is free.
No invalid_key, revoked_key, expired_key, inactive_developer Fix the credential or talk to us. Retrying cannot help, and a retry loop on a 401 just fills your logs.
No validation_failed, not_found Fix the request. The same request will fail the same way.
No quota_exceeded Depends on your plan's billing_method: on daily (Free Trial), your daily transaction limit resets at midnight; on calls, wait for the billing period to roll over or upgrade; on balance, the prepaid balance is spent or the package has ended — activate a new package. (Note: rate_limited is separate per-key per-minute burst protection.)
No feature_unavailable, origin_not_allowed Nothing about the request will change the answer. Move to a package that includes the API, or register the origin against the key.

A 422 does cost a credit. The request reached the calculation before it was rejected. Key problems, rate limits, quota limits and faults on our side cost nothing.

Usage, credits and pricing

A credit is one route priced on a calculation endpoint. Everything else is free.

What each endpoint costs

EndpointCredits
POST /toll/calculate-polyline 1
POST /toll/calculate-from-polyline 1
GET /toll/vehicle-types Free
GET /me Free
GET /usage Free

One credit buys one route. A waypoint call with alternatives: true prices every road the router offers, so it costs a credit per route returned — up to 3, and only one when the router had only one road to offer. meta.credits_used on the response is always the figure that reaches your usage. Quota counts calls, not credits: one request is one call against your monthly allowance however many routes come back.

Billing methods & limits

Every subscription uses one of three billing_method models:

  • daily (Free Trial): Enforces a daily transaction limit separately for Individual and Business accounts. Usage is aggregated across all API keys on your developer account and resets automatically at midnight.
  • balance (Prepaid Balance Packages): Deducts exact per-endpoint INR rates from your prepaid balance over the package validity window.
  • calls (Call-Quota Plans): Grants a fixed number of billable calls per billing period (monthly/yearly).

Per-minute rate limit vs daily/period quota: rate_limit_per_minute is per-API-key burst protection (returns 429 rate_limited). Daily/period quotas are aggregated across your developer account (returns 429 quota_exceeded). Informational endpoints (/me, /usage, and /toll/vehicle-types) never consume billable transactions or balance.

Available Packages

Start with our 14-day daily-limit Free Trial (no credit card required), or choose a Prepaid Balance Package with 30-day validity and per-call paise billing.

14-day trial

Trial Pack

Free daily transaction limit, 14 days, to build and test an integration. No credit card required.

₹0 /14 days
  • ✓ 25 txns/day (Individual)
  • ✓ 150 txns/day (Business)
  • ✓ 14 days validity period
  • ✓ No credit card required
  • ✓ 10 req / minute
  • ✓ 4 max waypoints
  • ✓ 1 API key
Prepaid Pack

Starter Pack

₹6,000 of calls, valid 30 days. Around 4,800 waypoint routes.

₹6,000 /30 days (ex-GST)
  • ✓ ₹6,000 call balance granted
  • ✓ 30 days validity period
  • ✓ ₹3.50/call – Toll from a polyline
  • ✓ ₹1.25/call – Toll by waypoints
  • ✓ 60 req / minute
  • ✓ 4 max waypoints
  • ✓ 2 API keys
Prepaid Pack

Standard Pack

₹75,000 of calls, valid 30 days. Around 100,000 waypoint routes.

₹75,000 /30 days (ex-GST)
  • ✓ ₹75,000 call balance granted
  • ✓ 30 days validity period
  • ✓ ₹2.25/call – Toll from a polyline
  • ✓ ₹0.75/call – Toll by waypoints
  • ✓ 600 req / minute
  • ✓ 10 max waypoints
  • ✓ 5 API keys
Prepaid Pack

Corporate Pack

₹3,00,000 of calls, valid 30 days. Unlimited waypoints.

₹300,000 /30 days (ex-GST)
  • ✓ ₹300,000 call balance granted
  • ✓ 30 days validity period
  • ✓ ₹1.80/call – Toll from a polyline
  • ✓ ₹0.60/call – Toll by waypoints
  • ✓ 1,200 req / minute
  • ✓ Up to 10 waypoints
  • ✓ 10 API keys

Detailed plan & package comparison

Plan / Package Billing Model Price Allowance / Balance Per-Call / Overage Validity Requests / min Keys Max waypoints Action
Starter Pack Prepaid Pack ₹6,000/30d ₹6,000 balance ₹1.25 – ₹3.50 / call 30 days 60 2 4 Choose Starter Pack
Basic Pack Prepaid Pack ₹20,000/30d ₹20,000 balance ₹1.00 – ₹3.00 / call 30 days 180 3 8 Choose Basic Pack
Standard Pack Prepaid Pack ₹75,000/30d ₹75,000 balance ₹0.75 – ₹2.25 / call 30 days 600 5 10 Choose Standard Pack
Corporate Pack Prepaid Pack ₹300,000/30d ₹300,000 balance ₹0.60 – ₹1.80 / call 30 days 1,200 10 10 (API cap) Choose Corporate Pack

Prices are in Indian rupees and exclude taxes (18% GST). Prepaid balance packages deduct exact per-endpoint prices (₹0.30 for from-polyline, ₹0.50 for waypoints) until the balance is exhausted. Higher volumes, annual terms and contractual commitments are arranged by conversation — talk to us.

Running out of calls

Your planWhat happens past the allowance
Sells overage The call is served and billed at the plan's overage rate. The response carries X-Quota-Overage: 1, so you hear about it at the time.
No overage The call is refused with 429 quota_exceeded until the period rolls over.

Why your limits may differ from the table

A live subscription holds its own snapshot of the terms it was sold on, so a change to a plan applies to you at renewal rather than mid-period. GET /me always reports what will actually be enforced on your account, which is the figure to trust over this table.

Try it yourself

Build a real request in the browser. Your input is checked against the same rules the server applies, and a polyline is decoded, measured and drawn with the same algorithm the API uses.

Demonstration mode — nothing here calls the API. Every endpoint needs a key, and a key placed in a web page is a published key, so there is none on this page. What you get below is genuine: real validation, a real polyline decode, a real distance measurement, a real coverage check, and the exact request to copy. Toll plaza matching and pricing happen on our servers and need your own key — ask for one, or copy a code example.

Demonstration

An encoded string, or a GeoJSON LineString or [[lng, lat], …] array. The sample loaded here is a real precision-5 encoding of a 13-point Chennai to Bengaluru line.

Required for a string. Ignored for an array.

POST /api/v1/developer/toll/calculate-from-polyline
Press “Validate and decode” to build the request body.

Want to see real responses without writing code? The Postman collection is the quickest route: import it, set your key once, and every request on this page is there with its assertions.

Code examples

Plain HTTP, in the languages people ask for. Every one reads the key from the environment rather than carrying it.

No official SDKs yet. There is no FastagJi package to install in any language. These are ordinary HTTP calls with your normal HTTP client, which is also the quickest thing to debug.

Toll from waypoints

curl -s -X POST https://fastagji.in/api/v1/developer/toll/calculate-polyline \
  -H "Authorization: Bearer $FASTAGJI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
        "waypoints": [
          {"lat": 13.0827, "lng": 80.2707, "address": "Chennai"},
          {"lat": 12.9716, "lng": 77.5946, "address": "Bengaluru"}
        ],
        "vehicle_type": "car",
        "trip_type": "single"
      }'

Toll from your own route

curl -s -X POST https://fastagji.in/api/v1/developer/toll/calculate-from-polyline \
  -H "Authorization: Bearer $FASTAGJI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
        "polyline": "{eznA{z|hNjtHrpp@j~HrkHbfGros@ztDnjy@{w@~}s@vwAjya@fqWrkf@ftXzp_@wdCrquAotLnp{@_sSzw^orWjeM",
        "format": "google5",
        "vehicle_type": "car",
        "trip_type": "single"
      }'

Postman collection

The quickest way to see real responses without writing anything. Every endpoint on this page is in it, each with assertions on the envelope, the quota headers and credits_used, so a broken setup tells you so rather than looking fine.

  1. Import the collection.
  2. Set the base_url variable to https://fastagji.in.
  3. Put your key in the api_key variable — as a secret variable, so it is not written into the collection file you might later share.
  4. Run the folder. Start with Vehicle types: it costs nothing.

Ask us for the collection file; it is sent with your key. We do not publish it here, because a collection with a base_url and an empty key field invites somebody to paste a key into a public page.

Three things worth getting right first time

DoWhy
Log meta.request_id on every call It is the only thing that lets us look at your exact request rather than trying to reproduce it.
Treat a null fare as unknown, never as 0 A ?? 0 turns a missing rate into a free plaza and silently understates the total.
Check totals.complete before showing a price false means the number is a floor. Showing it as the fare is how a customer ends up short at a barrier.

Frequently asked questions

The questions integrators actually ask, with the answers we actually give.

How do I get a FASTagJi API key?

Developer registration is available via self-service. Choose a subscription plan and register your account with your name, work email, and mobile number to get started.

Is the API key shown again after it is issued?

No. A key is stored only as a SHA-256 hash, so the full key is shown once at issue and cannot be recovered afterwards — not by you and not by us. Put it in your secret store straight away. If it is lost, we revoke it and issue a new one.

What is the difference between the two toll calculation endpoints?

The waypoint endpoint takes up to 10 coordinates and builds the route itself, then prices the plazas on the route it chose. The polyline endpoint takes a route you already have, from Google Maps, Mapbox, HERE or your own router, and prices the plazas on that exact geometry without routing it again. If you already pay a mapping provider for routing, use the polyline endpoint: the tolls then belong to the road your driver is actually on.

Which polyline formats are supported?

Google Encoded Polyline at precision 5, which is what Google Directions returns in overview_polyline; the same algorithm at precision 6, which Mapbox and Valhalla can be asked for; and GeoJSON LineString, including a Feature wrapper or a bare coordinate array. HERE Flexible Polyline is a different format and is not supported yet — convert it to GeoJSON, or ask HERE for an encoded polyline.

Why must I declare the polyline format?

Precision 5 and precision 6 are the same bytes read at different scales, so reading one as the other multiplies or divides your whole route by ten. In one direction the route leaves the globe and we refuse it immediately. In the other, every coordinate is still a legal coordinate and the route lands in the Gulf of Guinea, where there are no Indian toll plazas. Rather than guess and hand you an empty result, we ask. The format field is optional only when you send GeoJSON, because an array cannot be anything else.

Does a simplified polyline give a worse result?

No. We fill in the gaps in supplied geometry before matching plazas, closely enough that a plaza in the middle of a long straight stretch is still found. Google overview_polyline works with no special handling, and the same road returns the same fare whether you send three points or twelve hundred. Your toll total does not depend on how hard your provider simplified the line.

Why is a toll fare sometimes null?

Null means we hold no published rate for that plaza. It never means free. Those plazas are counted in totals.unpriced_plazas, and totals.complete is set to false, so you can tell that the total is a floor rather than the real fare. The alternative — treating a missing rate as zero and adding it — produces a total that looks complete and is wrong.

Why do the plazas in a closed-loop stretch have no individual fare?

On a closed-loop corridor you pay once for where you entered and where you left, not at every barrier. Those plazas share a closed_loop.group, each reports a null fare, and the charge for the whole stretch sits on closed_loop.group_fare. Summing fare.amount across the plazas gives the correct total. Summing group_fare per plaza would charge the stretch once for every barrier on it.

Which vehicle types can I price?

Seven: car, LCV, bus, multi-axle, four to six axle, seven or more axle, and HCM/EME. Each maps to its NETC vehicle class, and the response tells you which class was used. Both single and return journeys are supported, with the return rate taken from the published return column rather than doubled.

How are API calls counted?

One request is one credit on the toll calculation endpoints. The vehicle types, account and usage endpoints are free. Requests that fail because of a key problem, a rate limit, a quota limit, or a fault on our side consume no credit. A 422 validation failure does consume one, because the request reached the calculation.

What happens when I run out of calls?

On a plan that sells overage, the call is served and billed at the plan overage rate, and the response carries an X-Quota-Overage header so you hear about it at the time rather than on the invoice. On a plan without overage, the request is refused with a 429 and the quota_exceeded code. Either way, every successful response carries X-Quota-Limit, X-Quota-Used and X-Quota-Remaining so you can see where you stand without spending a call to ask.

Are there rate limits?

Yes, per minute and per key, taken from your plan rather than from a fixed number. Over the limit returns a 429 with a Retry-After header. Every successful response carries X-RateLimit-Limit and X-RateLimit-Remaining, so a well-behaved client can slow itself down instead of discovering the limit by hitting it.

Which countries are covered?

India only. We hold NHAI and NETC toll data. A route outside India is refused with a 422 rather than returned as a complete calculation with a total of zero, because a zero total would read as "this road is free" when it means "we do not cover this road".

Are there official SDKs?

Not yet. The code examples on this page are plain HTTP integrations in cURL, PHP, Laravel, JavaScript and Python — no FASTagJi package to install. A Postman collection is available, which is the quickest way to see the real responses.

Can I get a route with the tolls, or do I need two calls?

The waypoint endpoint returns the route geometry as GeoJSON alongside the tolls, so one call gives you both. By default it returns the single best route, because a caller asking for one route should not be billed for three. Send alternatives: true and you get every road the router offers instead, each priced on its own.

Can I compare the cheapest route against the fastest one?

Yes. Send alternatives: true to the waypoint endpoint. Every road the router offers between your two points is priced separately, and the response labels each one fastest, cheapest or shortest — lowest duration, lowest toll total, lowest distance. A comparison block says what the cheapest road saves against the fastest and what that saving costs in time and distance. These are the same three rules our own Toll Calculator uses, so the API and the public page answer the same way for the same journey.

What do route alternatives cost?

One credit per route returned, up to three. A call without the flag is one route and one credit, exactly as before alternatives existed. If the router can only offer one road, or the journey has via stops and so has no alternatives at all, you are charged for the one route you got. meta.credits_used on every response is the figure that reaches your usage and your invoice. Quota is separate: one request is one call against your monthly allowance however many routes come back.

How do I report a wrong fare?

Send us the meta.request_id from the response. Every response carries one, and it is the identifier of that request in our logs, so we can look at exactly the call you are asking about rather than trying to reproduce it.

Changelog

Official release notes for FASTagJi Developer Toll APIs. What we hold ourselves to within v1 is listed below.

  • FASTagJi Developer Toll APIs — Initial Launch

    The complete suite of FASTagJi Developer Toll APIs is now live, providing route-based toll calculations, toll plaza identification, and vehicle-specific rates across Indian National Highways and Expressways.

    • Toll Calculation from Waypoints: POST /api/v1/developer/toll/calculate-polyline – send up to 10 waypoints to automatically route and calculate plaza-by-plaza toll charges across the entire journey.
    • Toll Calculation from Existing Route Geometries: POST /api/v1/developer/toll/calculate-from-polyline – supply your own geometry from Google Maps, Mapbox, HERE, or OSRM in google5, google6, or geojson formats, and price the exact road without rerouting.
    • 7 NETC Vehicle Classes Supported: GET /api/v1/developer/toll/vehicle-types – free endpoint listing all vehicle classes (Car/Jeep/Van, LCV, 2-Axle Bus/Truck, 3-Axle Commercial, 4-6 Axle, and 7+ Axle) and trip types (single, return, monthly pass).
    • Account & Period Usage: GET /api/v1/developer/me and GET /api/v1/developer/usage – inspect active plan, rate limits, remaining quotas, and daily call totals.
    • Closed-Loop Expressway Pricing: Entry and exit plaza pairs are priced accurately as a continuous journey according to published NETC fare tables.
    • Transparent Null Handling: Plazas without gazetted rates report null and are counted in totals.unpriced_plazas, never silently misrepresented as zero.
    • Flexible Billing Models: Support for Prepaid Balance Packages (pay-as-you-go balance with 30-day validity), backed by a real-time usage ledger in the Partner Portal.
    • Secure Key Authentication: Dual support for Authorization: Bearer <key> and X-API-Key headers, with self-service key generation.

What we hold ourselves to within v1

  • A field will not be removed or renamed, and its type will not change.
  • An error.code will not be renamed. Messages may be reworded.
  • New fields may be added. Treat an unknown field as ignorable rather than as an error, or a routine addition will break your client.
  • Anything that cannot be done under those rules goes to /api/v2/developer, and v1 keeps working.

Known limits today

  • Self-service sign-up is available. Select a subscription plan to register your developer account.
  • Of the plan feature switches, only max_waypoints is enforced. The others are stored and reported but not yet read by any endpoint.
  • Key scopes are stored but not enforced; every current key can reach every v1 endpoint.
  • No batch endpoint. One route per request.
  • HERE Flexible Polyline is not supported yet.

Support

One channel, and one thing to include in your message.

Get a key, or ask anything

Accounts, keys, plans, a wrong fare, a feature you need — all through the same place.

Contact us

Reporting a wrong fare or plaza

Send the meta.request_id from the response. Every response carries one, and it identifies that exact call in our logs — so we look at your request rather than guessing at a reproduction.

If a key has leaked

Tell us straight away and we revoke it. Revocation takes effect on the next request, with no grace period. Quote the key's prefix — the part before the final underscore — never the secret.

Before you write in: if a fare looks wrong, check fare.rate_revision and totals.complete first. A plaza's rate may simply have been revised, or the total may be flagged incomplete already — both are visible in the response you already have.

This page documents v1 of the Developer Toll API and was last updated against the API on .