Roaming & OCPI

Embedding EV Charging in Your App: Three Integration Routes and What Each Takes

By YoHub9 min read

💡 Embed EV Charging in App: Key Highlights

  • Three integration routes: bilateral eMSP (CPO by CPO over OCPI 2.2.1), through a roaming hub (one OCPI connection, full coverage), or UBC on Beckn (India only, UPI-based)
  • Hub route collapses N integrations into one: Locations, Tokens, Commands, Sessions and CDRs all flow through a single connection
  • UBC is Beckn, not OCPI: Unified Bharat e-Charge runs on the Beckn protocol; always “OCPI 2.2.1 + UBC (Beckn)”, never blended
  • Settlement models differ by market: in India the hub invoices and settles; outside India parties settle directly
  • Four common app-side tasks: station data freshness, price display, payment/invoicing, and session lifecycle management

Your app already has the users. They book rides, manage fleets, process payments or navigate routes. What they cannot do today is find a charger, start a session and pay for it — without leaving your interface. Adding that capability means your app becomes an e-mobility service provider — an eMSP in OCPI 2.2.1 terminology — and the path you choose to get there determines the engineering effort, the commercial contracts and the charging coverage your users see on day one.

This post lays out three routes available to any product team that wants to embed EV charging in an app, compares what each one requires, and covers the common app-side work that applies regardless of which route you pick.

Route 1: Bilateral eMSP — Connect CPO by CPO

You implement the OCPI 2.2.1 protocol as an eMSP and negotiate a direct connection with each charge point operator individually. OCPI 2.2.1, maintained by the EVRoaming Foundation, defines the data exchange between CPOs and eMSPs across six functional modules: Locations for station data, Tokens for driver credentials, Commands for remote start and stop, Sessions for real-time charging updates, CDRs for the final billing record, and Tariffs for pricing structures.

As a bilateral eMSP, your engineering team builds and certifies each module endpoint. Then you approach CPO after CPO: run the credentials handshake, exchange test tokens, validate sessions and CDRs, and go live. Each new CPO is a separate integration, a separate contract, and a separate testing cycle. The coverage you offer your users equals the number of CPOs you have signed and integrated.

The bilateral approach gives you full control over the commercial terms with each operator — you negotiate pricing, settlement frequency and service-level terms directly. The cost is linear scaling: ten CPOs means ten integrations to build and maintain, ten sets of token lists to keep current, and ten reconciliation processes to run every billing cycle. For a deeper look at what bilateral OCPI connections really cost, see our earlier post on OCPI bilateral connections.

Route 2: Through a Roaming Hub — One Connection, Full Coverage

Instead of connecting to every CPO individually, you connect once to a hub that already has those CPO connections in place. The hub acts as an intermediary — defined as the HUB role in the OCPI 2.2.1 specification — relaying messages between your eMSP endpoints and each CPO’s endpoints without either party needing to know the other’s implementation details.

You still implement the same OCPI modules, but against a single counterparty. Here is what each module delivers through the hub connection:

Locations flow from every connected CPO through the hub to your app, giving you a station map from day one — not after months of bilateral onboarding. Each location object carries its EVSEs, connectors, power ratings and real-time availability status.

Tokens. Your app pushes driver credentials to the hub, which distributes them to CPOs. The hub handles the credential propagation that you would otherwise manage per-CPO. For how OCPI tokens work across networks, see our earlier post.

Commands. When a user taps a charger in your app, you send a START_SESSION command through the hub’s Commands interface. The hub routes it to the correct CPO. STOP_SESSION works the same way in reverse. Your app sends one command; the hub knows which CPO operates that EVSE.

Sessions. The Sessions module then streams real-time updates — kWh delivered, cost so far, session state — back through the hub to your app UI. This is what lets you show a live charging screen rather than a spinner.

CDRs. When the session ends, the charge detail record arrives with the final energy, duration, tariff applied and total cost. This is the billing anchor: the number your app uses to charge the driver and the number the hub uses to invoice you or reconcile with the CPO.

The hub route collapses the N-bilateral problem into one integration. Coverage scales with every CPO the hub onboards, without additional engineering work on your side.

Route 3: India Only — UBC on Beckn

Unified Bharat e-Charge (UBC) is an interoperability initiative led by the Ministry of Heavy Industries, with Bharat Heavy Electricals Ltd (BHEL) appointed as the Project Implementation Agency and NPCI BHIM Services Ltd handling platform design and development. UBC was launched on 15 August 2026.

UBC runs on the Beckn protocol — the same open, decentralised protocol behind ONDC (Open Network for Digital Commerce) — not on OCPI. The two are architecturally distinct: OCPI 2.2.1 is a bilateral or hub-routed protocol between CPOs and eMSPs; Beckn is a registry-based discovery and fulfilment protocol. They serve different layers of the interoperability stack, and describing UBC as a version of OCPI would be inaccurate.

UBC enables EV users to discover chargers and initiate sessions with payment via UPI through apps like BHIM, without needing separate operator apps or wallets. For app teams building in India, UBC offers a path to charging interoperability that is native to India’s digital public infrastructure.

YoHub supports UBC: through one connection, an app can access OCPI 2.2.1 roaming and UBC (Beckn), without building and maintaining separate integrations for each.

Comparison: Three Routes at a Glance

Bilateral eMSPRoaming HubUBC (India only)
ProtocolOCPI 2.2.1OCPI 2.2.1Beckn
You buildFull eMSP endpointsSame endpoints, one connectionBeckn participant adapter
Contract withEach CPO directlyOne hubUBC network
Coverage day oneOnly CPOs you have signedEvery CPO on the hubParticipating UBC CPOs
Billing / settlementNegotiated per CPOIndia: hub invoices eMSP, settles with CPO. Outside India: parties settle directlyUPI-based payment
Ongoing maintenancePer-CPO: tokens, tariffs, reconciliationOne counterparty for allVia UBC network

App-Side Work That Applies on Every Route

Whichever route you choose, four pieces of engineering and operations work are common across all three.

Station Data Freshness

Your app needs an accurate, current map of chargers. Under OCPI, the Locations module provides this: each location carries its EVSEs, connectors, power ratings and real-time availability status. Stale data — a charger shown as available when it is offline or occupied — is the fastest way to lose user trust. How frequently you pull or receive pushed location updates, and how you handle status transitions, matters more than the initial data load. We covered this in detail in our post on how EV charging station data is distributed.

Price Display

Drivers expect to see what a session will cost before they start it. Under OCPI, prices are structured through the Tariffs module as combinations of energy, time, parking-time and flat components, with optional restrictions by time of day, power level or duration. Your app must parse these tariff objects and render them clearly. The gap between the CPO’s published tariff and what the driver sees in your UI is where billing disputes start. For the structure of OCPI tariffs and worked examples, see our post on OCPI tariffs.

Payment and Invoicing

This is where the India and international models diverge — and they must never be blended. In India, the hub settles: it invoices the eMSP, collects payment, and pays the CPO, with GST handled at each step. The app’s finance team has one counterparty for all charging transactions. Outside India — in the UAE, for example — the hub reconciles the kWh and amounts between parties, but the CPO and eMSP invoice and settle with each other directly. The hub never holds or pays out funds there. Your app’s billing integration, payment gateway, invoicing and accounting treatment will differ depending on which settlement model applies to your market.

Session Lifecycle in the App UI

Regardless of route, the user experience follows the same arc: discover a charger, see its status and price, authenticate, start the session, see live progress, stop the session, and receive the final cost. The engineering challenge is mapping the protocol’s session states to your app’s UI states reliably — handling edge cases like a session that the charger terminates unexpectedly, a CDR that arrives minutes after the session ends, or a network timeout during a remote start command.

Operational Realities

Most apps that reach meaningful coverage use a hub rather than bilateral connections, because the coverage-to-effort ratio is dramatically better. Some apps connect to more than one hub, or maintain a few direct CPO links alongside a hub connection, depending on their market and strategic relationships. The integration is not a one-time project: CPO networks change tariffs, add stations, retire EVSEs and update firmware continuously, so your app-side code must handle ongoing data changes gracefully.

YoHub connects 70-plus CPO networks and 40-plus eMSPs as of October 2026, with 75,000-plus charging stations reachable worldwide. In India, that is 14,000-plus stations reachable. Through one OCPI 2.2.1 connection, an app reaches every party on the hub. In India, YoHub also supports UBC (Beckn) through the same connection, so an app team does not need to build and maintain separate integrations for OCPI roaming and UBC.

For eMSP and app teams evaluating integration, the platform details are on the YoHub eMSP page. Fleet platforms can explore the fleet integration path. Technical documentation and API references are available at the developer portal. For India-specific coverage and settlement, see the India page.

Frequently Asked Questions

What does it mean to embed EV charging in an app?

It means adding the ability for your app’s users to discover charging stations, start and stop charging sessions, and pay for them — all within your existing app interface. Technically, your app becomes an eMSP (e-mobility service provider) under the OCPI protocol, or a participant on the UBC (Beckn) network in India.

Do I need to implement OCPI 2.2.1 to add charging to my app?

If you use the bilateral or hub route, yes — your app implements the eMSP side of OCPI 2.2.1 (Locations, Tokens, Commands, Sessions, CDRs, Tariffs). If you use the UBC route in India, you implement the Beckn protocol instead. Through a hub like YoHub, one OCPI 2.2.1 connection covers both OCPI roaming and UBC (Beckn).

What is the difference between UBC and OCPI?

OCPI 2.2.1 is a bilateral or hub-routed protocol for data exchange between CPOs and eMSPs, maintained by the EVRoaming Foundation. UBC (Unified Bharat e-Charge) runs on the Beckn protocol, a decentralised discovery and fulfilment protocol developed as digital public infrastructure in India. They are architecturally distinct and serve different layers of the interoperability stack.

How does billing work when charging sessions go through a hub?

It depends on the market. In India, the hub invoices the eMSP (your app), collects payment, and settles with the CPO — so your finance team has one counterparty. Outside India (for example, the UAE), the hub reconciles energy and amounts, but the CPO and eMSP invoice and settle with each other directly. The hub does not hold or disburse funds in that model.

How many charging stations can my app access through a roaming hub?

Coverage depends on the hub’s connected CPO networks. YoHub, for example, connects 70-plus CPO networks and 40-plus eMSPs as of October 2026, with 75,000-plus stations reachable worldwide and 14,000-plus in India. Coverage grows as new CPOs join the hub, without additional integration work from your side.

Researched and drafted with AI assistance; facts checked against the sources linked above and reviewed by the YoHub team.

Sources: OCPI 2.2.1 Specification — EVRoaming Foundation | National Conference on EV Charging Infrastructure — PIB, Ministry of Heavy Industries | Year End Review 2025: Ministry of Heavy Industries — PIB | Beckn Protocol

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