Set what drivers pay

Create tariffs with energy, time and session prices, assign them to a project, location, charger or outlet, and read what every session cost.

4 min readEdit this page
On this page

A tariff is the price a driver pays to charge: per kWh, per minute, per session, with night rates, weekday rates and different prices for AC and DC. Assign it once to a project, a location, a charger or a single outlet, and Flowion prices every session there, while it runs and after it ends.

A tariff is what drivers pay you. What a site pays its electricity supplier is a supply contract, and the two never mix.

Create a tariff

POST/v1/projects/$PROJECT/tariffsbash
curl -X POST "$API/projects/$PROJECT/tariffs" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tariffId": "standard",
    "currency": "SEK",
    "energy": {
      "prices": [{"priceKwh": "3.50"}],
      "taxRates": [{"type": "VAT", "tax": "25"}]
    },
    "fixedFee": {
      "prices": [{"priceFixed": "5.00"}],
      "taxRates": [{"type": "VAT", "tax": "25"}]
    }
  }'

The answer is 201 with the tariff, "version": 1. tariffId is your own name for it: 1 to 60 letters, digits, ., _, : or -. Leave it out and Flowion assigns one.

Only currency is required. A tariff charges for whichever parts you include:

PartPrice fieldCharged
energypriceKwhPer kWh delivered
chargingTimepriceMinutePer minute spent charging
idleTimepriceMinutePer minute plugged in without charging
fixedFeepriceFixedOnce per session
minCost, maxCostexclTax, inclTaxA floor and a ceiling on the total

Every price is a decimal string before tax. taxRates on each part adds tax on top: tax is a percentage, and when a part has several rates, stack sets the order they compound in, from 0. description holds the tariff's text for drivers, one entry per language.

Price by time, day or charger type

Each part takes a list of prices, and a price can carry conditions. The first price in the list whose conditions all hold is the one that applies. A price with no conditions always holds, so put it last as the fallback.

json
"energy": {
  "prices": [
    {"priceKwh": "2.50",
     "conditions": {"startTimeOfDay": "22:00",
                    "endTimeOfDay": "06:00"}},
    {"priceKwh": "4.50",
     "conditions": {"evseKind": "DC"}},
    {"priceKwh": "3.50"}
  ]
}

That reads: 2.50 at night on any charger, 4.50 for fast DC charging during the day, 3.50 otherwise. A window whose end is before its start runs past midnight.

Conditions you can price on:

ConditionHolds
startTimeOfDay, endTimeOfDayBetween two local times, HH:MM
dayOfWeekOn the listed days, "Monday" to "Sunday"
validFromDate, validToDateBetween two dates
evseKindOn "AC" or "DC" outlets
minEnergy, maxEnergyOnce the session has delivered so much energy
minChargingTime, minIdleTime, minTime, and their max pairsOnce the session has run so long

Times and days are read on the charger's local clock: its location's time zone, or the project's when the location has none. A tariff with a time or day condition needs the project to have a time zone, and answers 422 timeZoneRequired until it does. Set it with PATCH /v1/organizations/{organizationId}/projects/{projectId} and {"timeZone": "Europe/Stockholm"}.

Change a price

Send the tariff again with the same tariffId. Every edit creates a new version, and assignments follow the tariff, so the new price applies everywhere it is assigned straight away.

GET/v1/projects/$PROJECT/tariffs/standard/versionsbash
curl "$API/projects/$PROJECT/tariffs/standard/versions" \
  -H "Authorization: Bearer $TOKEN"

lists every version, newest first, and GET /v1/projects/{id}/tariffs the latest version of each tariff.

Assign it

POST/v1/projects/$PROJECT/tariffs/standard/assignbash
curl -X POST "$API/projects/$PROJECT/tariffs/standard/assign" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"locationId": "'$LOCATION'"}'
200Response
{
  "level": "location",
  "nodeId": "5d1e…",
  "tariffId": "standard",
  "assignedAt": "2026-10-01T09:12:00Z"
}

Send exactly one of projectId, locationId, chargingStationId or evseId (one outlet); none or more than one is 400. The most specific assignment wins: an outlet's own tariff, then its charger's, then its location's, then the project's. Assign a default to the project and override only where prices differ.

GET /v1/projects/{id}/tariff-assignments lists every assignment in the project, each with an assignmentId. DELETE /v1/projects/{id}/tariff-assignments/{assignmentId} removes one, and the level above applies again.

A tariff assigned to a charger is also installed on the charger itself, for chargers that show prices to drivers, and kept there. dispatchOutcome in the answer is the charger's reply, and GET /v1/charging-stations/{id}/tariffs asks the charger what it holds right now. Not supported on every charger. See which.

Show a location's prices by the hour

For a price board in your app, ask for one local day:

GET/v1/locations/$LOCATION/tariff-hours?date=2026-10-01bash
curl "$API/locations/$LOCATION/tariff-hours?date=2026-10-01" \
  -H "Authorization: Bearer $TOKEN"
200Response
{
  "outcome": "ok",
  "date": "2026-10-01",
  "tariffId": "standard",
  "currency": "SEK",
  "timeZone": "Europe/Stockholm",
  "nowHour": 11,
  "hours": [
    { "hour": 0, "ac": "2.50", "dc": "2.50" },
    { "hour": 11, "ac": "3.50", "dc": "4.50" }
  ]
}

hours has all 24 hours of the day on the location's clock, each with the energy price before tax for AC and for DC outlets, under the tariff the location's chargers inherit. nowHour marks the current hour when the date is today. outcome is noTariff when nothing is assigned, and zoneUnknown when the tariff prices by time of day and there is no time zone to read it in.

How a session's cost is worked out

Flowion prices a session period by period. Wherever the price that applies changes during a session, at 22:00 or after the first 20 kWh, a new period begins, and each period is priced at its own rate. A session plugged in at 21:00 pays the day rate until 22:00 and the night rate after it.

Then, in order:

  1. Each part (energy, charging time, idle time) is the sum of its periods.

  2. The fixed fee is added once, at the price that held when the session started.

  3. Each part's tax is applied.

  4. minCost and maxCost lift or cap the total, compared with the total including tax.

Read the result for any session, running or ended:

GET/v1/transactions/$TRANSACTION/costbash
curl "$API/transactions/$TRANSACTION/cost" \
  -H "Authorization: Bearer $TOKEN"

The answer, and the two cases where there is no price yet, are explained in Track sessions, energy and cost.

Endpoints

Energy · Transactions · Charging stations

In the API reference