generate and reconcile OCPI 2.2.1 Charge Detail Records (CDRs) between a CPO and an eMSP for post-session billing
domain: evroaming.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Confirm both parties' OCPI 2.2.1 credentials/version handshake has completed and the CDRs module is a registered capability
After a charging session ends, have the CPO POST a CDR object to the eMSP's CDRs receiver endpoint with the session's cdr_id, tariffs, and charging_periods
Validate that total_cost and total_energy on the CDR match the sum of the charging_periods' dimensions and tariff pricing
Store the CDR and return an HTTP 201 acknowledgment per the OCPI push model
On mismatch, use the GET CDRs endpoint (client-owned or server-owned, per negotiated role) to re-fetch and diff the record before disputing
Reconcile against the original Session object's last known status/kwh to catch sessions that ended abnormally
Known gotchas
OCPI CDRs are immutable once sent — corrections require issuing a new CDR referencing the original, not editing in place
Which party pushes vs pulls the CDRs module is determined by the negotiated sender/receiver roles in the version handshake, so the integration direction must match
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?