Isolate sequence, timing, and retry defects across CPO and eMSP boundaries. Trace message flows to find where production behavior diverges. Charging Session · EV Simulator · ChargerDojo
Meet the OCPI Team
Starting a Charging Session
Real-time Updates During Charging
Finishing the Charging Session
Build Your Own Flow
Meet the OCPI Team
Who talks to whom in the EV charging world?
What You'll Learn:
- The main players in OCPI communication
- Who owns what in the EV charging ecosystem
- How these entities work together
What defines OCPI 2.2.1
Modules in this version
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.
The Players in This Lesson:
EV Driver
DRIVERCharging Station Operator
CPOE-Mobility Service Provider
EMSPCharging Station
CHARGERKey Takeaways:
CPO manages physical charging stations
EMSP handles customer service and billing
Drivers interact with both through apps and cards
OCPI is how CPO and EMSP talk to each other
What a roaming conversation looks like on the wire
A charging session is not one call. It is a sequence, and the order matters: the parties exchange credentials before anything else, the CPO checks whether a token may charge, a session opens and is updated while power flows, and a CDR closes it out and moves the money. Reading that sequence once, end to end, is usually the moment OCPI stops feeling abstract.
The value of seeing it as a flow rather than a list of endpoints is that most real bugs are ordering and state bugs rather than schema bugs. A session updated after it closed, a CDR sent for a session the other side never saw, a token authorized against a location that was never published: each of these is a perfectly valid message arriving at the wrong moment.
Where to go next
Common questions
Which message starts a roaming relationship?
The credentials handshake. Two parties exchange tokens and endpoint URLs so each knows how to reach the other and how to authenticate. Nothing else works until it has completed, and a surprising number of integration problems turn out to be a handshake that half-succeeded.
Does the CPO or the eMSP push the CDR?
The CPO produces the CDR, because the CPO ran the session and metered it, and it goes to the eMSP who will bill the driver. That direction catches people out, because the money flows the other way.