How UBC Works

Deep technical documentation of the Unified Bharat e-Charge protocol — architecture, flows, APIs, and network benefits.

UBC network architecture illustration showing charging stations connected to a central discovery service with Indian architectural elements

Contents

  1. Reference Architecture
  2. Network Actors
  3. QR Code Standard
  4. Stage 1 — Discovery
  5. Stage 2 — Selection
  6. Stage 3 — Payment Initiation
  7. Stage 4 — Confirmation
  8. Stage 5 — Charging Session
  9. Stage 6 — Completion & Settlement
  10. Stage 7 — Rating & Support
  11. Undercharge & Overcharge Settlement
  12. Network Benefits

1. Reference Architecture

The Unified Bharat e-Charge (UBC) protocol is built on the Beckn Protocol, a decentralized, open standard that enables peer-to-peer commerce between consumer applications and service providers. For EV charging, this means any EV driver app (BAP) can discover and book charging services from any charge point operator (BPP) on the network — without proprietary lock-in.

The protocol maps EV charging semantics onto Beckn's commerce primitives:

EV Domain EntityBeckn ConceptDescription
Charging ConnectorItemEach physical connector on a charging station is one Item with a unique ID following the connector nomenclature.
Charging Tariff / ServiceOfferPricing plans attached to items — per-kWh, per-minute, or flat-rate with idle fee policies.
Charging Session / BookingOrderThe lifecycle of a charging session from creation through completion, including payment and fulfillment.

The network operates on protocol version 2.0.0 with a domain identifier beckn.one:deg:ev-charging and a default message TTL of PT30S (30 seconds).

2. Network Actors

BAP Buyer Application Platform — the consumer-facing EV app (e.g., BHIM). Initiates discovery, selection, and payment.
BPP Buyer Provider Platform — the CPO's service endpoint. Maintains charger inventory, calculates pricing, manages sessions.
CDS Catalog Discovery Service — intermediary that caches BPP catalogs and handles discovery fan-out.
NO / NBSL Network Operator — NPCI BHIM Services Limited. Certifies participants, maintains the distributed registry.

Role separation

3. QR Code Standard

Every UBC-enabled charging connector has a QR code placed on or near the socket. Scanning this code with any UBC-compatible app triggers discovery for that specific connector — no app-specific scanning required.

URI Format

beckn://discover?&message.catalogs.items.provider.id={PROVIDER_ID}&message.catalogs.items.id={ITEMS_ID}&version=1.0

Item ID Structure (Connector Level)

<country-code>*<operator-id>*<station-id>*<point-id>*<connector-id>

Example: IND*ECO*BTM*01*CCS2-A

4. Stage 1 — Discovery

Panoramic blue ink engraving on white showing a smartphone with an EV charging app displaying a map view with charging station markers, surrounded by physical charging stations in an engraved landscape

API: discover BAP → CDS

The user opens their EV app and either scans a QR code on a charger or searches for nearby chargers. The BAP sends a discover request to the CDS.

QR-Scan Discovery

"message": {
  "filters": {
    "type": "jsonpath",
    "expression": "$[?(@.beckn:itemAttributes.qrIdentifier == 'https://charge.ecopower.in/cs01-ccs2')]"
  }
}

Geographic Discovery

Filters by vehicleType, connectorType, availabilityWindow time range, and spatial geo filter (s_dwithin with Point + distanceMeters).

API: on_discover CDS → BAP

The CDS responds with a catalog of available connectors. If cached data exists, it responds immediately. Otherwise, it fans out to non-caching BPPs who respond individually.

Catalog contents:

5. Stage 2 — Selection

Wide-screen blue ink engraving on white showing smartphone selecting an EV charger connector on the left, a circular interoperability symbol with India outline in the center, and a parchment pricing sheet with four stacked icon sections on the right

API: select BAP → BPP

The user selects a charger. The BAP sends select to the BPP that owns that connector.

Payload:

API: on_select BPP → BAP

The BPP returns a pricing quote. orderValue contains exactly 4 component types:

If the slot is already booked: orderStatus: REJECTED, error code 40000.

"orderValue": {
  "value": "143.95", "currency": "INR",
  "components": [
    {"type": "UNIT", "value": "112.50"},
    {"type": "SURCHARGE", "value": "40.00"},
    {"type": "DISCOUNT", "value": "-15.00"},
    {"type": "FEE", "value": "6.45"}
  ]
}

6. Stage 3 — Payment Initiation

Panoramic blue ink engraving on white showing smartphone with payment confirmation on the left, EV charging station with vehicle plugged in the center, and payment ecosystem medallions with Indian architectural elements on the right

API: init BAP → BPP

The user confirms the quote and enters payment details. The BAP sends init with billing information and the buyer's UPI ID.

Payload:

BAP-Led Payment: If beneficiary: BAP is set, the BAP collects payment directly. The BPP's on_init response is authoritative — if the BPP echoes BAP, BAP collects; if BPP, the BPP retains collection rights.

API: on_init BPP → BAP

The BPP assigns an order.id and returns payment details:

UPI-Native Flow: The BPP retrieves a dynamic UPI intent link from the CPO's payment gateway. This is redirection-less — the payment gateway verifies credit in real-time with the UPI network. No browser redirects, no separate payment app switching.

API: on_status (unsolicited) BPP → BAP

Once the payment gateway confirms the UPI transaction, the BPP sends an unsolicited on_status to the BAP:

7. Stage 4 — Confirmation

API: confirm BAP → BPP

The BAP confirms the order with orderStatus: PENDING and the COMPLETED payment reference. The BPP locks the connector and prepares for the charging session.

API: on_confirm BPP → BAP

The BPP confirms the booking with orderStatus: CONFIRMED and returns fulfillment details:

API: status / on_status — Connector Check

Before starting, the BAP can check if the connector gun has been physically connected:

8. Stage 5 — Charging Session

Active EV charging session with telemetry gauges in blue ink illustration style

API: update BAP → BPP

The user plugs in the connector and taps "Start Charging" in the app. The BAP sends update to begin the session.

API: on_update BPP → BAP

The BPP starts the physical charging session:

API: track / on_track — Live Telemetry

During charging, the BAP can request real-time state-of-charge:

Telemetry metrics:

MetricUnit CodeDescription
STATE_OF_CHARGE%Battery percentage
POWERKWHCurrent power draw
ENERGYKWCumulative energy delivered
VOLTAGEVLTCurrent voltage
CURRENTAMPCurrent amperage

9. Stage 6 — Completion & Settlement

API: on_update (async/unsolicited) BPP → BAP

The charging session stops when: the battery reaches the cost limit, 100% state-of-charge, or the user manually stops. The BPP sends an unsolicited on_update:

User-Initiated Stop

If the user stops early, the BAP sends update with fulfillment.deliveryAttributes.sessionStatus: STOP. The BPP responds with on_update containing the finalized Charge Detail Record (CDR) reflecting actual energy consumed.

10. Stage 7 — Rating & Support

API: rating / on_rating

After the session, the user rates the charging experience:

The BPP responds with received: true and a feedbackForm URL + submission_id for extended feedback.

API: support / on_support

If the user needs help, a structured support flow opens:

API: cancel / on_cancel

Cancellation is only possible while sessionStatus is PENDING (before charging starts). Once ACTIVE, use update with sessionStatus: STOP instead.

Both user-initiated (cancel) and provider-initiated (unsolicited on_cancel) are supported.

11. Undercharge & Overcharge Settlement

Since the pre-authorized amount is an estimate, the actual energy consumed may differ. UBC handles two settlement scenarios:

Undercharge — Refund Flow

Scenario: Pre-authorized ₹143.95 (2.5 kWh @ ₹45/kWh), but actual consumption was only 2.0 kWh (₹90.00). Excess ₹53.95 must be refunded.

  1. on_update (Completion): orderValue.value: 90.00 (actual), with a negative DISCOUNT component of −₹53.95 labeled "Refund adjustment — excess amount to be refunded". paymentStatus remains COMPLETED.
  2. on_status (Refund Confirmed): Once the payment gateway confirms the refund (SLA ~7 business days), the BPP sends on_status with paymentStatus: REFUNDED and payment.amount.value: 53.95 (the refund amount).

Detection: Compare payment.amount.value (paid) vs orderValue.value (actual). If paid > actual → undercharge. Look for negative DISCOUNT component.

Overcharge — Outstanding Balance Carried Forward

Scenario: Pre-authorized ₹143.95 but actual consumption was 5.0 kWh (₹287.90). The uncollected ₹143.95 is recorded against the user.

  1. on_update (Completion): orderValue.value: 287.90 (full actual). The FEE component includes ₹112.50 for excess units consumed. payment.amount.value: 143.95 (only pre-auth collected), paymentStatus: COMPLETED.
  2. Next session's on_select: When the same user starts a new session with the same CPO, the orderValue includes an additional FEE component of ₹143.95 with description "Outstanding balance carried forward from previous overcharge session". The BAP should surface this to the user.

Detection: If paid < actual → overcharge. In the next on_select, look for a FEE component with "Outstanding balance" in the description.

12. Network Benefits

Self-healing network visualization showing charging station nodes across India with ratings and reliability indicators

Universal Ratings & Reviews

Every connector on the network carries rateable: true and a rating object with ratingValue and ratingCount. This data is visible during discovery — users can compare chargers by quality (e.g., 4.7★ from 89 ratings vs 4.3★ from 156 ratings) before selecting one. Post-session ratings are captured via structured feedback (1–5 scale + comments + tags on the FULFILLMENT category), creating a transparent, self-improving quality signal across all CPOs.

Self-Healing Network

The CDS (Catalog Discovery Service) caches BPP catalogs, decoupling discovery from real-time BPP availability. If a BPP goes temporarily offline, the CDS can still service discovery requests from cache — the user sees available chargers without interruption. If cached data has no availability, the CDS falls back to fan-out, querying non-caching BPPs directly. Charging interruptions trigger immediate unsolicited on_status (sessionStatus: INTERRUPTED) followed by on_update reconciliation, ensuring both BAP and BPP converge on true state without manual intervention.

More Players, More Options

Because UBC is built on an open protocol (not a closed platform), any CPO can join by implementing a Beckn endpoint and getting certified by NBSL. Any eMSP can build a BAP. This means more charging networks visible to users, more consumer apps to choose from, and healthy competition driving down prices and improving service quality. The connector nomenclature (IND*operator*station*point*connector) ensures every charger is uniquely identifiable across the entire national network.

Reliability & Success-Rate Data

The network collects structured data about every session — success rates, failure modes, interruption frequency, charger uptime, and user ratings. This data is visible to the NO (NBSL) and informs certification decisions. Over time, the network builds a comprehensive reliability picture: which CPOs have the best uptime, which connector types are most reliable, which locations have the highest success rates. This data-driven feedback loop incentivizes CPOs to maintain high standards, as poor performance directly impacts their visibility in discovery results.

Additional Network Features

Technical specification based on UBC TSD v0.9 from github.com/bhim/ubc-tsd. Protocol version 2.0.0, domain beckn.one:deg:ev-charging.