ChargeIndia Hub is an OCPI 2.2.1 roaming broker. It does not speak OCPP. RFID taps and Autocharge (MAC / EVCCID) are modeled as OCPI Tokens. The CPO CSMS maps OCPP idTag (or vehicle MAC) to token.uid before calling Hub.
Remote app start (START_SESSION with auth_method: COMMAND) already works with type: "RFID". This page covers charger-initiated flows.
Conventions
| Mode | token.type | uid | Typical auth_method |
|---|---|---|---|
| RFID card | RFID | Card UID | AUTH_REQUEST or WHITELIST |
| Autocharge | OTHER | Normalized MAC / EVCCID | AUTH_REQUEST or WHITELIST |
Partners may agree to use RFID for Autocharge UIDs; OTHER is the Hub default recommendation for MAC/EVCCID.
Prefer whitelist: ALWAYS or ALLOWED_OFFLINE when pushing Tokens for offline Autocharge.
Online authorize (RFID tap / plug-in)
When the driver authenticates at the charger, the CPO asks the eMSP through Hub in realtime:
CPO → Hub: POST /ocpi/2.2.1/tokens/{uid}/authorize?type=RFID
Headers: OCPI-To = eMSP
Hub → eMSP: POST {tokens_sender_url}/{uid}/authorize?type=RFID
Hub returns full AuthorizationInfo (allowed, optional token, location, authorization_reference, info). Set authorization_reference when possible so Hub can rewrite a Hub cdr_token under COMPATIBILITY.
API details: CPO Tokens · eMSP Tokens
Whitelist / offline Autocharge
For low-latency or offline auth, the eMSP pushes Tokens to Hub; Hub fans out to routed CPOs:
eMSP → Hub: PUT /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{uid}
Hub → CPO: PUT /ocpi/2.2.1/tokens/{emsp_cc}/{emsp_pid}/{uid}
CPO may also GET /ocpi/2.2.1/tokens (routing-filtered) to pull Tokens. Invalid / valid: false Tokens are still forwarded so CPOs can revoke whitelist entries.
Sessions and CDRs
After authorize (online or whitelist):
- CPO pushes session with
auth_method: AUTH_REQUESTorWHITELIST - Prefer a real eMSP identity on
cdr_token(not HubCIH) - If
cdr_tokenis Hub and the CPO is in active COMPATIBILITY, Hub may rewrite via matchingSTART_SESSIONorauthorization_event(authorization_reference, elsetoken.uid) - CDR follows the same routing rules
Full contract: Session Lifecycle
Partner checklist
CPO
- [ ] Map OCPP Authorize / StartTransaction
idTag(or Autocharge MAC) → OCPItoken.uid - [ ] Call Hub
POST …/tokens/{uid}/authorizewithOCPI-To= token-owning eMSP - [ ] Implement Tokens RECEIVER for Token whitelist push
- [ ] Optionally
GETTokens from Hub for pull sync - [ ] Push sessions/CDRs with correct
auth_methodand eMSPcdr_token
eMSP
- [ ] Issue RFID cards and Autocharge MACs as OCPI Tokens
- [ ] Implement Tokens SENDER for CPO-initiated
POST …/authorize - [ ] Push Tokens with appropriate
whitelistfor offline Autocharge - [ ] Return full AuthorizationInfo (include
authorization_referencewhen useful)
Out of Hub scope
OCPP CSMS, RFID readers, Autocharge MAC learning UI, and Plug & Charge are not implemented in Hub. Stay on OCPI Token authorize + sync.
Related docs
- Session Lifecycle — authorize → session → CDR (including COMMAND path)
- CPO Tokens — charger authorize, receive push, pull
- eMSP Tokens — push Tokens, receive CPO authorize
- Routing — which CPO↔eMSP pairs are allowed
- CPO Guide · eMSP Guide