Charging Session Simulation

Validate session correctness from authorization through final CDR publication. Covers lifecycle workflow, meter updates, and billing handoff. Message Flows · Key Terminologies · EV Simulator

What defines OCPI 2.2.1

Modules in this version
Locations
Sessions
CDRs
Tariffs
Tokens
Commands
Credentials
Hub Client Info
Charging Profiles
Payments
Bookings
A sending side and a receiving side

Each module now has two sides: the one that pushes data out and the one that takes it in.

The trust token is encoded

The shared secret is Base64-encoded before it is sent, rather than sent in plain form.

Billing records name the party

A charge record now says which country and company the driver token belongs to.

Authorization
Start Session
Charging
Stop Session
Billing (CDR)
Ready to Charge

Please authorize to begin the charging session.

What's Happening?

One charging session, from plug-in to invoice

This is the flow every other flow is measured against. A driver arrives, presents a token, and the charge point operator has to decide, in the moment and without a contract with that driver, whether to deliver power. It asks the token authorization question, opens a session, meters it while the car charges, closes it when the cable is pulled, and produces a charge detail record that the driver's provider will pay against.

Each of those steps has a failure that costs somebody money. Authorize when you should not and you have delivered free electricity. Fail to close a session and it hangs open in both systems. Produce a CDR whose total cost does not match the tariff you published and your partner will reject it, and the resulting reconciliation is somebody's week.

Where to go next

Common questions

What happens if the session never closes?

It stays open in both systems and no CDR is produced, so the charge is never billed and the driver may appear to still be charging. It is one of the most common roaming defects and one of the least visible, because nothing errors: a message simply never arrives.

Why do CDRs get rejected?

Most often a required field is missing or a total does not agree with the tariff that was in force. The receiving side cannot bill on a record it cannot reconcile, so it refuses it rather than guessing.