How does OCPI Work?
OCPI is modular.
Each module contains specific data that can be exchanged such that a CPO and PTP can interact with each other to process EMV card payments. The modules required for Payter's Direct Payment solution are:
- Credentials
- Locations
- Sessions
- Commands
- CDRS
- Tariffs
- Payments
- Tokens
Each modules role or purpose is detailed in the Specification section of this guide. The multi-use nature of OCPI means that these modules may serve purposes that are outside of the scope of Payter's requirements. For each module, we provide some tips and guidance on interpreting the specification.
Many of the diagrams, descriptions and details in this guide are recreated from the EV Roaming Foundation API specifications. We're merely summarising and in some cases deliberately reducing the complexity or detail of the specification.
Payment Process Detail
The Payter OCPI implementation is designed for solutions where the payment terminal is the only Human Machine Interface (HMI), but it does not require this. Where the CPO is aware of User ↔️ Charge Station interaction, they are able to update their Locations data, or send Commands to Payter. At its core, the Payter OCPI integration will provide user prompts that determine:
- What the user wants to do e.g Start a Session
- What Connector and EVSE they want to do this on
- Whether they are aware of the Tariff and Pricing
- Whether they have successfully Pre-Authorized their payment card for the required amount
What a Driver Wants To Do
Our User Interface offers 4 choices:
- Start - As a driver, I want to begin a charging session using my EMV payment card
- Stop - As a driver, I want to stop a current charging session using the payment terminal
- Receipt - As a driver, I want to access a receipt for a charging session completed on this terminal in the last 24 hours
- Language Select - As a driver, I want to amend the display language from the local default to a supported language of my choice.
Start Flow
The Start flow is unique amongst these options as the only one that has complex OCPI interaction. When Start is requested, Payter's OCPI solution will interact with the CPO, via OCPI, to determine:
- The Location data including available Connector's and EVSE's
- The tariff data including pricing and the tariff_alt_text*
The Payment Terminal Interface then interacts with the driver to confirm acceptance before prompting for a payment card. The card has a Pre-Authorization attempted for the pricing or default amount, and upon a success Payter send a Start Session to the CPO. Payter also 'store' the tokenised payment card details for later use in the Receipt and Stop flows.
Receipt & Stop Flows
The payment terminal prompts for a card to be presented. When this is done, the unique token of this card is compared against current or historical sessions and where applicable choices are offered e.g. more than one session in the last 24hrs for a receipt. Only in the case of a Stop does this result in an OCPI Stop Session being sent to the CPO.
Language Selection
There is no OCPI interaction in this short flow, but the various alternate language prompts can be configured individually.
The result of this pre-determined logic is a solution that relies on CPO OCPI-compliant data, preset label values, and customer engagement, to provide a holistic EMV payment solution for a Charge Point Operator that works consistently with minimal development overhead.
Visual Flow
The below sequence diagram outlines how a Start and Stop flow is achieved between Payter and the CPO.
