Settlement & Reconciliation

CDR Reconciliation: Why Roamed Sessions Don’t Match, and How to Fix Them

By YoHub12 min read

CDR reconciliation: two EV charging stations linked by data streams that converge into one matched record

💡 CDR Reconciliation: Summary

  • Match on the full key first: country_code + party_id + CDR id, then compare kWh, amount, currency and time.
  • Most breaks fall into ten patterns, from missing and duplicate CDRs to tax-basis and party-attribution errors.
  • A plausibility check (connector power × duration) catches Wh-for-kWh errors before they reach an invoice.
  • Reconcile daily, not at month end: a mismatch found in 24 hours still has logs and people who remember it.
  • Every fix is a credit CDR plus a reissue. OCPI 2.2.1 never allows a sent CDR to be edited.

CDR reconciliation is the daily job of proving that the charge detail records (CDRs) a charge point operator (CPO) sent match what the e-mobility service provider (eMSP) received, recorded and is about to bill its drivers for. When the two sides agree, invoicing is routine. When they don’t, the gap usually shows up weeks later as a disputed invoice line that nobody can explain, because the session logs have rotated and the people who saw it happen have moved on.

Our earlier guide to EV roaming settlement followed one roamed session from authorisation to payout. This post goes one level deeper into the step where most of the money leaks: matching the records. It sets out a taxonomy of mismatches, a matching sequence you can automate, the case for reconciling every day, and what a dispute record needs so it can be closed quickly.

What CDR reconciliation compares

In OCPI 2.2.1 the CDR is, in the words of the specification, “the only billing-relevant object”. The CPO creates it after the session ends and sends it to the eMSP whose customer charged. Reconciliation compares three views of the same session:

  • The CPO’s ledger: the CDRs it created, priced from the charger’s meter values and the tariff in force.
  • The eMSP’s ledger: the CDRs it received, plus its own trail of real-time authorisations and Session updates for the same token.
  • The hub’s record, where a hub sits in the middle: what actually passed through, and when.

The match runs in two passes. The first is identity: does every CDR exist exactly once on each side? A CDR id is unique only per country_code/party_id combination, so the key is all three fields together. Matching on id alone works until two CPOs happen to use the same numbering scheme, then it quietly merges their sessions. The session_id and authorization_reference fields link a CDR back to the Session and to the authorisation the eMSP gave, which is how an eMSP can spot a CDR it never authorised.

The second pass is value: for each matched pair, compare total_energy (kWh), total_cost (both excl_vat and, where present, incl_vat), currency, total_time and the start and end timestamps. OCPI numbers carry four decimals by default, so set an explicit tolerance per field rather than demanding exact equality. A fraction of a paisa or a fil per session is rounding. The same gap repeated on every session from one location is a defect.

Ten reasons roamed sessions don’t match

Almost every break in CDR reconciliation falls into one of ten patterns. Classifying each exception into one of them is what makes the work repeatable: each pattern has a typical cause, a typical owner and a typical fix.

MismatchWhat it looks likeUsual causeUsual fix
1. Missing CDRThe eMSP has a completed Session but no CDR.POST failed and was never retried; CDR held back by a pricing error.CPO resends; eMSP pulls with GET over the window.
2. Duplicate CDRTwo CDRs for one session_id.CDR regenerated with a new id after a timeout, instead of resending the original.CPO credits the extra CDR.
3. Orphan CDRA CDR the eMSP can’t tie to any authorisation or Session.Offline or whitelist authorisation; token not yet synced; test traffic.Check token whitelist rules; accept or dispute.
4. Unit errorEnergy about 1,000 times too high (or too low).Wh reported where OCPI expects kWh.Credit CDR and reissue in kWh.
5. Time-zone driftSessions land in different days or months on each side.Local time compared with UTC; period cut on start time on one side and end time on the other.Agree UTC and a single cut rule.
6. Tariff versionkWh agree, amount differs.The CDR was priced with a newer or older tariff than the eMSP expected.Compare the tariff embedded in the CDR; credit if wrong.
7. Zero-energy or invalid sessionA CDR with 0 kWh and a fee, or none at all.Failed starts, connection errors, sessions the CPO marked INVALID.Apply the contract’s rule for idle and failed sessions.
8. Party attributionCDR sent to, or booked by, the wrong eMSP or sub-brand.Token party_id mapped to the wrong account.Fix the mapping; credit and resend to the right party.
9. Tax basisAmounts differ by exactly the tax rate.One side compares excl_vat, the other incl_vat.Reconcile on excl_vat; check tax separately.
10. Rounding and step sizeSmall, consistent differences per session.Different step_size handling or rounding order.Align on the specification’s step-size rules.

Ten mismatch patterns in roamed CDRs. Patterns 1, 4, 5, 6, 7 and 10 are covered in more detail in our settlement guide; the rest are explained below.

Duplicate CDRs

Duplicates are usually caused by a retry. The CPO’s POST times out, the CPO’s system assumes the CDR was lost, and it builds a fresh CDR with a new id. Both arrive. Because OCPI forbids replacing or deleting a CDR, the eMSP cannot simply drop one. The CPO has to send a credit CDR for the extra record. The prevention is simple: on retry, resend the same CDR with the same id, so the receiver can recognise it. To catch the duplicates that still get through, look for two or more CDRs that share a session_id, or a token, an EVSE and overlapping times.

Orphan CDRs and token attribution

An orphan is a CDR the eMSP can’t link to anything it knows about. Some orphans are legitimate. If a token’s whitelist setting allows the CPO to authorise locally, for example while the charger is offline, the eMSP may see no real-time request at all. Others point to a mapping fault: a token booked under the wrong party_id, or a sub-brand of the eMSP sharing tokens under a parent ID. Check the cdr_token object (its country_code, party_id, uid and contract_id) against your token register before you dispute. Attribution errors are expensive because they sit in the wrong ledger, where neither side’s reconciliation will flag them.

Tax-basis differences

OCPI’s Price type carries excl_vat as mandatory and incl_vat as optional. If one team reconciles gross and the other net, every session appears to disagree by the tax rate. The rule of thumb: reconcile the commercial amount on excl_vat, then check tax as a separate step. Tax rules differ by market and by who invoices whom.

How to find mismatches: a matching sequence

Reconciliation by spreadsheet works for a few hundred sessions. It doesn’t work across dozens of roaming partners. The sequence below can be automated, and it runs the same way on either side of the connection.

  1. Fix the window in UTC. OCPI timestamps are UTC. When pulling with GET, date_from is inclusive and date_to exclusive, both applied to last_updated, so consecutive daily windows never overlap or leave gaps.
  2. Pull completely. Follow the pagination Link header to the last page. If X-Total-Count changes during the crawl, new CDRs arrived meanwhile. Run the window again rather than trusting a partial pull.
  3. Match on the full key (country_code + party_id + id), then list what is unmatched on each side. Unmatched on the CPO side means missing at the eMSP. Unmatched on the eMSP side means an orphan or a duplicate.
  4. Net out credits. Pair every credit CDR with its original through credit_reference_id before comparing values, or a corrected session counts three times.
  5. Compare values with tolerances on kWh, excl_vat, currency and duration.
  6. Run plausibility rules. Energy can’t exceed connector power multiplied by charging time. A 22 kW AC connector charging for 1.5 hours can deliver at most 33 kWh. A CDR showing 33,000 kWh is a Wh-for-kWh error, and so is one showing 0.033 kWh after an hour on a DC charger. The CDR identifies the EVSE and connector, and the connector’s max_electric_power in the Locations module gives you the ceiling.
  7. Classify every exception into one of the ten patterns and route it to an owner. An exception without a category tends to sit in the queue until month end.

Teams building this against the protocol directly will find the field-level detail on our OCPI 2.2.1 developer pages.

Why daily CDR reconciliation beats month end

OCPI doesn’t require CDRs in real time. The specification calls sending them “as soon as possible” good practice, and lets partners agree to send them monthly. Many partnerships still reconcile monthly, at the point of invoicing. That’s late.

Consider an illustrative CPO with 1,000 roamed sessions a day and a defect that drops 2% of CDRs. Reconciled daily, that’s 20 sessions to chase tomorrow morning, with the charger logs, the session updates and the engineer who changed the pricing service all still available. Reconciled monthly, it’s roughly 600 sessions, some of them a month old, and the defect has been running the whole time. The number of exceptions is the same either way. Daily reconciliation means each one is still cheap to explain.

Daily matching also protects the correction mechanism. OCPI doesn’t define how far back a CPO may send a credit CDR, so that limit has to be agreed between the partners. If invoices close monthly, a mismatch found on day 3 can be credited and reissued inside the same period. One found after the invoice has gone out becomes an adjustment on the next invoice, and possibly a tax correction as well. The volume behind this keeps growing: the IEA’s Global EV Outlook 2025 counts more than 5 million public charging points worldwide at the end of 2024, after 1.3 million were added that year.

What a good dispute record contains

A dispute that says “your March total is wrong” can take weeks to close. A dispute that names the CDR, the field, both values and the evidence can be closed the same day. A good dispute record carries:

FieldWhy it matters
CDR key (country_code, party_id, id)Identifies exactly one record on both sides.
session_id and authorization_referenceLinks the CDR to the Session and to the authorisation the eMSP gave.
Token (uid, contract_id) and location, EVSE, connectorSettles attribution questions without another round of emails.
Mismatch category (one of the ten)Routes the dispute to the team that can fix it.
Both values, side by sidekWh, excl_vat, currency, start and end in UTC, as each party recorded them.
EvidenceSession update history, meter readings, and signed_data where the charger provides signed meter values.
Proposed resolutionAccept, credit and reissue, or write off below an agreed threshold.
Owner and deadlineKeeps the dispute inside the invoice period it belongs to.

Fields for a CDR dispute record. Everything except the category, the resolution and the deadline comes straight from the OCPI 2.2.1 objects.

Whatever the outcome, the resolution goes through the protocol. The CPO sends a credit CDR (a new id, credit set to true, credit_reference_id pointing at the original, negative total_cost), then a corrected CDR with another new id. Corrections made only in a spreadsheet or an email thread leave the two ledgers permanently out of step.

CDR reconciliation under the two settlement models

The matching method above doesn’t change between markets. What changes is who you reconcile against and what the matched record is used for. The two models run separately, and the difference matters when a dispute is raised.

India: the hub settles

In India, YoHub connects parties over OCPI 2.2.1 + UBC (Beckn), and the hub settles payments. It invoices the eMSP, with GST, and pays the CPO. Each party therefore reconciles against the hub, not against every counterparty. A CPO checks the hub’s payout against the CDRs it sent. An eMSP checks the hub’s invoice against the CDRs it received. A dispute is raised with the hub, which holds both sides of the record.

Outside India: peer-to-peer settlement, hub reconciliation

Outside India, the parties settle with each other directly. The CPO invoices the eMSP and the eMSP pays the CPO. The hub reconciles kWh and amounts between them and surfaces the mismatches to both sides, but never holds or pays out funds. Here a dispute is between the two parties, and the hub’s matched record is the neutral reference both can point to.

The volume to reconcile grows with reach. Across YoHub’s regional hubs, more than 75,000 charging stations are reachable, 14,000+ of them in India. Each new roaming partner adds another stream of CDRs to match.

A daily CDR reconciliation checklist

For CPO teams

  • Alert on any completed, billable Session with no CDR within 24 hours.
  • On a failed POST, resend the same CDR with the same id. Never regenerate it.
  • Run the power × time plausibility rule before sending, not after the partner complains.
  • Embed the tariff actually applied in each CDR, and version tariff changes.

For eMSP teams

  • Pull yesterday’s UTC window with GET even if you receive by push, and diff the two.
  • Match every CDR to an authorisation through authorization_reference and the token.
  • Flag several CDRs per session_id, and overlapping sessions on one token.

Agree between partners

  • UTC everywhere, and one rule for which day a session belongs to.
  • Tolerances per field, and a write-off threshold below which no dispute is raised.
  • How far back credit CDRs are accepted, since OCPI leaves that open.
  • The rule for zero-energy, failed and idle sessions.

For CPOs, roaming through YoHub means one OCPI connection and one place to reconcile CDRs across partners. eMSPs and app teams can see the same flow from their side on YoHub for eMSPs.

Frequently Asked Questions

What is CDR reconciliation in EV roaming?

CDR reconciliation is the process of checking that the charge detail records a CPO sent match what the eMSP received and recorded. It covers whether each CDR exists exactly once, and whether its energy, amount, currency and times agree on both sides.

Why don’t CPO and eMSP session records match?

Mismatches usually come from missing or duplicate CDRs, orphan CDRs with no matching authorisation, Wh reported as kWh, local time compared with UTC, a different tariff version, zero-energy sessions, wrong party attribution, gross-versus-net amounts, or step-size rounding.

How do you match CDRs between two parties?

Match on country_code, party_id and the CDR id together, because a CDR id is only unique per CPO. Net out credit CDRs through credit_reference_id, then compare kWh, the amount excluding VAT, currency and duration within agreed tolerances.

Can a CDR be changed after it is sent?

No. OCPI 2.2.1 does not allow a sent CDR to be replaced, updated or deleted. The CPO sends a credit CDR that references the original and carries a negative total cost, then sends a corrected CDR with a new id.

How often should roaming partners reconcile CDRs?

Daily. OCPI allows CDRs to be sent as late as monthly by agreement, but a mismatch found within 24 hours can still be explained from logs and corrected with a credit CDR before the invoice period closes.

Sources: OCPI 2.2.1 CDRs module | OCPI 2.2.1 Sessions module | OCPI 2.2.1 Types (UTC, number, Price) | OCPI 2.2.1 Transport and format (pagination) | EVRoaming Foundation, OCPI | IEA, Global EV Outlook 2025: charging

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