Roaming & OCPI

OCPI Tariffs: Publishing Roaming Prices That eMSPs Can Show and Bill Correctly

By YoHub12 min read

OCPI tariff structure for EV charging roaming between CPO and eMSP networks

đź’ˇ OCPI Tariff: Key Highlights

  • The OCPI Tariff object is how a CPO publishes its charging prices to every connected eMSP — one structured data push replaces per-partner price sheets.
  • Four price dimensions — ENERGY (per kWh), TIME (charging duration), PARKING_TIME (idle/overstay fee), and FLAT (per-session fixed charge) — as defined in the OCPI 2.2.1 specification.
  • Restrictions control when each price applies — by time of day, day of week, energy delivered, power level, or session duration.
  • The tariff active at session start governs the CDR — mid-session tariff changes do not apply retroactively.
  • Tax handling is explicit — the tax_included flag and per-component vat field let CPOs and eMSPs handle GST (India, 18%) or VAT (UAE, 5%) correctly.

When a CPO publishes its prices through OCPI, those prices need to arrive at the eMSP’s app in a form that can be shown to the driver before they tap “Start” — and that produces a CDR total both sides agree on. That is the job of the OCPI tariff object, defined in the OCPI 2.2.1 specification published by the EVRoaming Foundation.

This post walks through the tariff data model: what each field does, how elements and price components combine, how restrictions control when a price applies, and how the resulting CDR amount is calculated. It includes three worked examples — a flat-rate AC tariff, a DC per-kWh tariff with an idle fee, and a time-of-day tariff — so you can map your own pricing into the structure. If you have already published tariffs and are dealing with CDR amount mismatches, the reconciliation process is covered separately in CDR Reconciliation: Why Roamed Sessions Don’t Match.

What an OCPI Tariff Object Contains

The Tariff object is the top-level container a CPO pushes to connected eMSPs via the OCPI Tariffs module. Each tariff describes a price that applies to one or more connectors at the CPO’s charging stations. Its core fields, as defined in OCPI 2.2.1:

FieldPurpose
country_code, party_idIdentify the CPO that owns the tariff (ISO-3166 alpha-2 + ISO-15118 party ID).
idThe CPO’s unique identifier for this tariff. Every tariff_id on a Connector points here.
currencyISO-4217 currency code. All price amounts are in this currency.
typeOptional TariffType enum — distinguishes standard, preferred, or profile-based tariffs.
elementsRequired list of TariffElement objects — the actual pricing rules (see next section).
min_price / max_priceOptional session-cost caps, each with before_taxes and after_taxes values.
tax_includedWhether price amounts include tax. Critical for cross-border roaming.
start_date_time / end_date_timeValidity window in UTC. Publish a future tariff in advance so eMSPs cache it before it activates.
last_updatedUTC timestamp of the most recent change. eMSPs use this to detect stale cached copies.
tariff_alt_text / tariff_alt_urlHuman-readable price description and web-page link for conditions the structured data doesn’t convey.

The CPO sends tariff updates to connected parties via the PUT method on the Tariffs module endpoint. eMSPs can also poll using GET with a date_from filter to fetch only tariffs changed since their last sync.

Tariff Elements and Price Components

Each Tariff contains one or more TariffElement objects. An element groups a set of PriceComponent objects under an optional set of restriction conditions.

A PriceComponent prices one dimension of the charging session. OCPI 2.2.1 defines four dimension types:

DimensionWhat It PricesTypical Use
ENERGYPer kWh of energy deliveredThe core charging cost
TIMEPer hour of charging durationTime-based billing, session duration fees
PARKING_TIMEPer hour the vehicle occupies the space without actively chargingIdle fee / overstay penalty
FLATFixed amount, charged once per sessionSession start fee, connection fee

Each PriceComponent carries three fields: price (the per-unit cost), step_size (the minimum billing increment — for example, a step_size of 300 on a TIME component means time is billed in 5-minute blocks), and optionally vat (the tax percentage).

The First-Match Rule

Only one PriceComponent per dimension can be active at any point during a session. When a tariff has multiple elements, the OCPI spec defines a first-match rule: the first element in the list whose restrictions match the current session state is the one used for that dimension. Element ordering matters — if two elements both contain an ENERGY component and the first element’s restrictions match, the second element’s ENERGY component is never reached.

Tariff Restrictions: When a Price Applies

Restrictions are optional on a TariffElement. When present, they define the conditions under which that element’s price components apply. When absent, the element applies unconditionally — which is why a catch-all element, if needed, goes last in the list.

The OCPI 2.2.1 specification defines these restriction fields:

Restriction FieldWhat It ControlsExample
start_time / end_timeDaily time window (local time, HH:MM)22:00–06:00 for overnight rates
day_of_weekSpecific weekdaysMonday–Friday for peak pricing
min_kwh / max_kwhCumulative energy delivered in the sessionFirst 20 kWh at one rate, remainder at another (tiered pricing)
min_power / max_powerPower level being delivered (kW)DC above 50 kW priced differently from AC
min_duration / max_durationSession duration (seconds)Idle fee after 3,600 s (1 hour)
reservationWhether the element applies to reserved sessions, non-reserved, or the reservation period itselfSeparate reservation fee element

Restrictions within a single element are AND-combined: all specified conditions must be true for the element to match. To model OR conditions — for example, a discounted rate on weekends or after 22:00 on weekdays — use two separate elements, each with its own restrictions, both carrying the same price components.

Linking Tariffs to Connectors

The Tariff object defines the price; the Connector object in the OCPI Locations module defines where that price applies. Each Connector carries a tariff_ids field — a list of Tariff IDs that apply to sessions on that connector.

A single tariff can be referenced by many connectors across many locations, which is the normal pattern: a CPO defines a few tariffs (perhaps one for AC, one for DC, one for premium locations) and assigns them broadly. Changes to the tariff propagate automatically to every connector that references it.

Before removing a tariff, the OCPI specification recommends ensuring no Connector still references it. An eMSP that receives a session on a connector whose tariff_id points to a tariff it has never received — or one that has been deleted — cannot calculate the expected cost, which leads to reconciliation disputes. If you are building an OCPI integration, validating tariff references on every Connector push is a worthwhile safeguard.

Worked Examples: Three Tariff Structures

The following three examples show how common pricing models map to OCPI tariff elements and components. All amounts are illustrative — they demonstrate the data structure, not recommended prices.

Example 1: Flat-Rate AC Charging

A CPO charges a flat connection fee plus energy per kWh, with no time-based charges. This is a single TariffElement with two PriceComponents and no restrictions.

ComponentTypePriceStep SizeRestriction
Connection feeFLAT501None
EnergyENERGY81000 (Wh = 1 kWh)None

Session delivering 15 kWh: 50 (flat) + 15 Ă— 8 (energy) = 170.

Example 2: DC Per-kWh with Idle Fee

A DC fast charger prices energy per kWh and adds a parking-time fee after 30 minutes to discourage overstaying. This needs two TariffElements.

ElementComponentTypePriceStep SizeRestriction
1EnergyENERGY181000 (1 kWh)None
2Idle feePARKING_TIME300 / hr (5 / min)60 (1 min)min_duration: 1800 s (30 min)

Session delivering 25 kWh in 45 minutes (15 min overstay): 25 Ă— 18 = 450 (energy) + 15 Ă— 5 = 75 (parking) = 525.

Example 3: Time-of-Day Pricing

A CPO incentivises off-peak charging with a lower energy rate overnight and on weekends.

ElementTypePrice / kWhRestriction
1 (Peak)ENERGY14start_time: 07:00, end_time: 22:00, day_of_week: Mon–Fri
2 (Off-peak)ENERGY9start_time: 22:00, end_time: 07:00 (no day restriction — covers weeknights + all weekend)

Weekday session from 21:30 to 22:30 delivering 20 kWh: energy delivered before 22:00 is priced at 14/kWh (Element 1); energy delivered after 22:00 is priced at 9/kWh (Element 2). The CDR records the total, with the tariff’s element list determining how the split was calculated. The first-match rule applies at each point in time during the session.

Tariff Versioning and Mid-Session Changes

The last_updated timestamp on the Tariff object is how eMSPs track changes. When a CPO updates a tariff — changing a price, adding an element, or modifying a restriction — it increments last_updated and pushes the new version via PUT.

What happens to a session that is already in progress when the tariff changes? The OCPI 2.2.1 specification is explicit: the driver accepted the tariff that was valid when they started the session. The tariff at session start is the tariff that governs the CDR. A CPO’s backend must retain the tariff version that was active at each session’s start time and use it for CDR calculation.

In practice, this means the CPO should not overwrite a tariff in place if sessions are still active under the old version. The cleaner pattern is to publish a new tariff with a new id (or use start_date_time on the replacement tariff set to a future time) and update the Connector’s tariff_ids at the switchover point. Sessions started before the switch use the old tariff; sessions started after use the new one.

Failing to version correctly is a common source of CDR mismatches. If the eMSP’s cached tariff has already been updated but the CPO’s CDR was calculated against the old version — or vice versa — the totals will not agree. The CDR reconciliation post covers how to detect and resolve these mismatches.

Tax Handling in OCPI Tariffs

OCPI tariffs include a tax_included field at the Tariff level and a vat field on each PriceComponent.

When tax_included is true, all price values in the tariff already include tax. The eMSP can display the price as-is in markets where tax-inclusive pricing is the norm.

When tax_included is false, the prices are net amounts. The vat field on each PriceComponent specifies the tax rate as a percentage. The eMSP must calculate and add tax before displaying the final price to the driver, following local rules.

In India, GST on EV charging services is levied at 18 percent under SAC 998714. A CPO publishing OCPI tariffs for the Indian market will typically set tax_included to true and bake the GST into the price, since Indian consumer-facing prices are conventionally inclusive. However, the invoicing between CPO and eMSP in a roaming settlement may require the tax component to be broken out — which is where the vat field and the CDR’s total_cost versus total_energy_cost separation become relevant.

In the UAE, VAT is 5 percent. A CPO may publish tariffs with tax_included false and vat set to 5.0 on each PriceComponent, letting the eMSP add VAT at display time.

This post does not constitute tax advice. The correct tax treatment depends on the jurisdiction, the nature of the supply, and each party’s tax registration. CPOs and eMSPs should consult their tax advisors for the applicable rates and reporting obligations.

How the eMSP’s Driver-Facing Price Relates to the CPO Tariff

The CPO tariff defines what the CPO charges for the session. The eMSP’s driver-facing price is usually different — the eMSP adds its own margin, may simplify the tariff structure for the consumer, or may convert currencies for cross-border roaming.

OCPI does not prescribe how the eMSP should derive its retail price from the CPO tariff. The tariff_alt_text and tariff_alt_url fields exist precisely because the structured tariff data alone may not capture everything a driver needs to know.

What matters for roaming operations is that the CDR total — calculated from the CPO’s tariff — is what the CPO invoices the eMSP (or, in a hub-settlement model, what the hub invoices). The eMSP’s retail price to the driver is the eMSP’s own commercial decision. The gap between the two is the eMSP’s margin.

When this gap leads to driver complaints (“the app said X but I was charged Y”), the root cause is usually one of three things:

  1. The eMSP cached a stale tariff and displayed an outdated price.
  2. The eMSP simplified a complex tariff structure into a single per-kWh rate that does not account for time or parking components.
  3. The eMSP failed to include tax in the displayed price when the CPO tariff was tax-exclusive.

Publishing OCPI tariffs correctly — with accurate elements, current restrictions, and clear tax handling — reduces these mismatches. But it does not eliminate the eMSP’s responsibility to translate the OCPI tariff into a consumer price that is both accurate and compliant with local pricing-transparency rules.

Frequently Asked Questions

An OCPI tariff is a structured data object defined in the OCPI 2.2.1 specification that a charge point operator (CPO) publishes to describe its charging prices. It contains tariff elements with price components for energy (per kWh), time, parking time (idle fees), and flat (per-session) charges, along with optional restrictions that control when each price applies. Connected eMSPs receive this data and use it to display prices to drivers and to verify CDR amounts.

The Connector object in the OCPI Locations module carries a tariff_ids field — a list of Tariff IDs that apply to sessions on that connector. A single tariff can be referenced by many connectors across many locations, so the CPO defines a few tariffs and assigns them broadly rather than creating one per charger.

The OCPI 2.2.1 specification states that the driver accepted the tariff valid at session start, so that tariff governs the CDR. Mid-session tariff changes do not apply retroactively. CPOs should publish a new tariff with a new ID or a future start_date_time rather than overwriting the active tariff while sessions are still in progress.

Use two or more TariffElements, each with an ENERGY PriceComponent and a restriction specifying start_time, end_time, and optionally day_of_week. The first element whose restrictions match the current time is used (first-match rule). For example, one element for peak hours (07:00–22:00, weekdays) and another for off-peak (22:00–07:00, plus weekends).

No. OCPI does not prescribe how the eMSP derives its retail price. The CPO tariff is the wholesale rate; the eMSP typically adds a margin, may simplify the structure, and may convert currencies. What matters for settlement is that the CDR total — calculated from the CPO’s tariff — is what the CPO invoices. The eMSP’s displayed price is its own commercial decision.

Sources: OCPI 2.2.1 Specification — EVRoaming Foundation | OCPI Tariffs Module (GitHub) | Karnataka AAR: 18% GST on EV Battery Charging Services | UAE Federal Tax Authority — VAT

Researched and drafted with AI assistance; facts checked against the sources linked above and reviewed by the YoHub team.

Publish Tariffs Once, Reach Every eMSP
YoHub distributes your OCPI tariffs, reconciles the CDRs, and handles settlement — so your pricing reaches every partner app without bilateral integration.
Book a Demo

Keep reading

More from the YoHub blog

Connect once. Reach every network.

Book a 45-minute call with the team that runs the platform. We'll map your integration and show you the network live.

Scroll to Top