CPO sends a CDR with its cost breakdown

Advanced · 4 min

OCPI 2.1.1, 2.2.1 and 2.3.0

Showing OCPI 2.2.1. Physical and billing-system events are authored examples.

Step 3 of 4 · Tariff and billing
cdrsCPOsendseMSPreceives
cdrsCPOsendseMSPreceivesDriverActor
Legend

The line follows the selected step. Actor dots identify the parties; they show no conformance verdict.

Step 3 of 4 · Paused

Selected step

All 3 actors

CPO · eMSP · Driver

Selected exchange

After the Session ends, the CPO sends the CDR. Its charging periods carry the energy and parking time, its tariffs list carries the Tariff as it stood at the start, and the total follows from both: 32.5 kWh at 0.30 plus 0.5 hours of parking at 0.05.

CPO → eMSP · cdrs

Sources (4)
"A *Charge Detail Record* is the description of a concluded charging session. The CDR is the only billing-relevant object. CDRs are sent from the CPO to the eMSP after the charging session has ended. Although there is no requirement to send CDRs in (semi-) realtime, it is seen as good practice to send them as soon as possible. But if there is an agreement between parties to send them, for example, once a month, that is also allowed by OCPI."OCPI 2.2.1 CDRs module · #mod_cdrs_cdrs_module"CDRs are created by the CPO. They most likely will be sent only to the eMSP that needs to pay the bill of the underlying charging session. Because a CDR is for billing purposes, it cannot be changed or replaced once sent to the eMSP. Changes are simply not allowed. Instead, a Credit CDR can be sent. CDRs may be sent for charging locations that have not been published via the Location module. This is typically for home chargers."OCPI 2.2.1 CDRs module · #mod_cdrs_flow_and_lifecycle"The _CDR_ object shall always contain information like Location, EVSE, Tariffs and Token as they were *at the start* of the charging session."OCPI 2.2.1 CDRs module · #mod_cdrs_cdr_objecttype · TariffDimensionType · cardinality 1: The dimension that is being priced price · number · cardinality 1: Price per unit (excl. VAT) for this dimension. vat · number · cardinality ?: Applicable VAT percentage for this tariff dimension. If omitted, no VAT is applicable. Not providing a VAT is different from 0% VAT, which would be a value of 0.0 here. step_size · int · cardinality 1: Minimum amount to be billed. That is, the dimension will be billed in this `step_size` blocks. Consumed amounts are rounded up to the smallest multiple of `step_size` that is greater than the consumed amount. For example: if `type` is `TIME` and `step_size` has a value of `300`, then time will be billed in blocks of 5 minutes. If 6 minutes were consumed, 10 minutes (2 blocks of `step_size`) will be billed.OCPI 2.2.1 specification · #mod_tariffs_pricecomponent_class
Why this matters

The CPO creates the billing-relevant CDR after charging ends. Delivery may be delayed by agreement, including monthly delivery.

Explore the cdrs module

Sandbox run · OCPI 2.2.1

Run this exchange in the sandbox

Test this flow

Test this flow runs against an eMSP endpoint you have registered.