Third-party services for the OCPI community: A billing example

Christopher Burgahn
Share&Charge
Published in
5 min readSep 29, 2020

Climbing the API mountain of electric vehicle charging with the OCN Service Interface (Part II)

Written by John Henderson and Christopher Burgahn

In Part I of this series we discussed how crucial APIs are for building electric vehicle (EV) charging products that customers love. We argued that EV roaming was only the beginning of many more digital connections that developers may have to develop. For this we gave three tips on how you could deal with this API mountain of electric vehicle charging: Walk and learn with others, build on open protocols and open source software, and get the most out of existing APIs. Whilst tip 1) and 2) are already followed by many in the industry, we see that already used protocols (in this case the OCPI protocol) have much more potential — if you’re just using it smartly.

In this article, we will introduce the Open Charging Network (OCN) Service Interface, a way of how the OCPI community can integrate third-party service providers without integrating new technical connections — making the most out of the OCPI API that a Charge Point Operator (CPO), eMobility Service Provider (eMSP) or any other OCPI party already has implemented.

The OCN Service Interface

With the Open Charging Network the EV charging industry has created an open source tool for technical interoperability based on one decentralized OCPI network — simple, secure and cost-efficient. With the release of version 1.1 this open source tool becomes even more powerful — by introducing the OCN Service Interface: A technical solution to enable third-party services (like billing, settlement, location data enrichment and many more) to offer their products to the OCPI community.

Open Charging Network with OCN Services

An OCPI-based billing service on the OCN

In the following section we will illustrate, based on a potential real-life scenario with one CPO, one eMSP and one billing service, how all involved parties can benefit from this technology.

Step 1 — The setting

Imagine an EV driver has signed up for the charging services of an eMSP. This eMobility Service Provider uses the OCN to be connected to various CPOs via their OCN Node connections (which are OCPI connections). Additionally, a billing service is connected to an OCN Node and is registered as a service via the OCN Service Interface. The CPO in our scenario has agreed to use the service.

Step 1 — The setting

Step 2 — The charging session

The EV driver uses the eMSP smartphone app to select a charging station of the CPO and to start and to stop a charging session. The OCN is used to send OCPI messages back and forth between the CPO and the eMSP (location information, session updates…). The final result of the charging session is a charge detail record (CDR), issued by the charging station and ready to be sent from CPO to eMSP.

Step 2 — The charging session

Step 3 — Sending of CDR

The CPO sends the CDR to its OCN Node, with the eMSP specified as the target recipient. The CPO’s OCN Node then looks up the address of eMSP’s OCN Node in the OCN Registry. In addition, the OCN Node checks for any given OCN Permission for this particular request, again in the OCN Registry. In this example use case, the CPO has given the permission to the billing service that it should receive copies of all requests that the CPO sends to the receiver interface of the OCPI CDR module (OCN Permission 8).

Step 3 — Sending of CDR

Step 4 — Forwarding / Delivering the CDR

Based on the OCN Permission that the OCN Node has identified in the OCN Registry, the OCN Node now forwards the CDR to the billing service, using the Open Charging Network. Right after the OCN Node sends the CDR to the eMSP, completing the initial OCPI request, initiated by the CPO.

Step 4 — Forwarding / Delivering the CDR

Step 5 — Billing the eMSP based on the received CDR

The billing service receives the CDR from the CPO via its OCPI connection to the OCN. It then uses the information given in the CDR and additional information, gathered from the CPO and/or eMSP in the sign up process for the service, to issue an invoice for the charging session to the eMSP on behalf of the CPO.

Step 5 — Billing the eMSP based on the received CDR

Step 6 — Sending invoice to eMSP via custom OCPI module

In a final step the billing service is now using the OCN to send the invoice to the eMSP. This is enabled by a custom OCPI module that the billing service and the eMSP agreed to use. Another option would be to send the invoice via mail or any other means of communication.

Step 6 — Sending invoice to eMSP via custom OCPI module

After these 6-steps the charging session and the related billing process between CPO and eMSP are completed.

What it brings and how to get started

The OCN Service Interface allows third-party service providers to get access to communication between two OCPI parties on the Open Charging Network, without any additional integration work to be done by the OCPI parties. OCPI parties can configure so-called OCN Permissions to allow OCPI messages from any OCPI module to be automatically forwarded to third-party service providers. With that, use-cases like billing, settlement, location data enrichment, green energy certification and many more become a reality without the need for endless API development work. It reduces the cost for integration work beyond the EV roaming use-case, helping everyone involved climbing the API mountain of Electric Vehicle charging. We consider this as crucial to a seamless mass-consumer experience and an efficient EV charging value-chain.

To get started with the OCN Service Interface and to see how the above given example works in action, a OCN Demo for developers is provided. It mocks a full set-up of an Open Charging Network with two OCN Nodes, two CPOs, one eMSP and one billing service and allows developers to run through the scenario outlined in this article. Get started here.

The Share&Charge Foundation encourages service providers to reach out to get their services running on the Open Charging Network. Just drop us an an email via partners@shareandcharge.com

--

--

Christopher Burgahn
Share&Charge

Entrepreneur. Bridge builder. Passionate about open sustainable innovation.