This guide explains what changes for eMSPs when you move from bilateral OCPI to roaming through ChargeIndia Hub. The protocol stays OCPI 2.2.1. The topology, credentials, and operational model change.
Why Hub
In peer-to-peer roaming, each CPO↔eMSP pair maintains its own credentials, URLs, and integration. On ChargeIndia Hub, you maintain one credentials relationship with the Hub. The Hub fans out traffic to connected CPOs based on routing rules.
| Aspect | Peer-to-peer | ChargeIndia Hub |
|---|---|---|
| Credentials | One exchange per CPO | One exchange with Hub (IN / CIH, role HUB) |
| Traffic path | Direct CPO ↔ eMSP | Always via Hub |
| Catalog / sessions / CDRs | Direct from each CPO | Hub store-and-forward (async push + pull backfill) |
| Commands | Direct callback from CPO | Hub rewrites response_url; callbacks via Hub |
OCPI version
ChargeIndia Hub supports OCPI 2.2.1 only. If your bilateral integrations use 2.1.1 or 2.2, plan a version cutover as part of migration.
Prerequisites
- Commercial onboarding - Contact your ChargeIndia account team for an assigned
country_code,party_id, and initial Hub token. See Onboarding. - Credentials exchange - Complete mutual registration with Hub. Remote role is
HUB, notCPO. See Authentication. - Receiver URLs - Provide sessions/CDRs/locations/tariffs receiver URLs where Hub should call your platform.
- Routing enablement - Roaming only flows for pairs with an active routing rule. See Routing.
- Async delivery - Receivers must be idempotent. See Async Delivery.
- Party identity on inbound pushes - Accept owning-CPO path parties; do not validate against credentials
rolesalone. See Hub Receiver Identity (eMSP). - Connection health - Poll
GET /ocpi/2.2.1/hubclientinfobefore relying on live traffic. See Connection Health.
What changes
| Area | Peer-to-peer | Via Hub |
|---|---|---|
| Outbound connections | N CPO endpoint configs | One Hub base URL |
| Token authorize | Call each CPO directly | Call Hub with CPO country_code / party_id in path |
| Commands | Call each CPO; receive callbacks from CPO | Call Hub; receive callbacks from Hub |
| Locations / tariffs | Pull from each CPO (or receive direct push) | Pull from Hub (routing-filtered); receive async push from Hub |
| Sessions / CDRs | Receive direct from each CPO | Receive from Hub only |
| Inbound OCPI peer | Each CPO | Hub only |
Outbound calls to Hub
| Module | Methods | Purpose |
|---|---|---|
| Tokens | PUT .../authorize | Realtime authorization before charging |
| Commands | POST .../commands/{command} | Start, stop, reserve, cancel |
| Locations | GET | Discover charge points (routing-filtered) |
| Tariffs | GET | Retrieve pricing (routing-filtered) |
| Sessions / CDRs | GET | Backfill and incremental sync |
Token authorization path - use the owning CPO's identifiers:
PUT /ocpi/2.2.1/tokens/{cpo_country_code}/{cpo_party_id}/{token_uid}/authorize
Inbound from Hub
Implement standard OCPI receivers, but accept calls only from Hub:
| Module | Methods | Purpose |
|---|---|---|
| Locations | PUT, PATCH | Async catalog updates |
| Tariffs | PUT | Async tariff updates |
| Sessions | PUT, PATCH | Async session updates |
| CDRs | POST | Async CDR delivery |
Command async results arrive at your response_url, forwarded by Hub from the CPO callback, not directly from the CPO.
When Hub forwards catalog and session updates, URL paths use the owning CPO's country_code and party_id. Authenticate with your Hub token, then validate the path party against routed CPOs via GET /hubclientinfo. See Hub Receiver Identity (eMSP).
Keep GET /ocpi/versions reachable for Hub health probes.
Migration checklist
- [ ] Bilateral CPO credentials decommissioned (or idle) after Hub cutover per CPO
- [ ] Single Hub credentials exchange complete
- [ ] All outbound OCPI pointed at Hub base URL
- [ ] Routing rules enabled for target CPOs
- [ ] Token authorization flow tested via Hub
- [ ] START_SESSION / STOP_SESSION tested end-to-end via Hub
- [ ] Session, CDR, location, and tariff receiver endpoints live and idempotent
- [ ] Location/tariff/session/CDR pull integrated for backfill
- [ ] HubClientInfo polled for counterparty availability
- [ ] Location/tariff/session receivers accept CPO
{country_code}/{party_id}in URL path - [ ] Receiver validation uses HubClientInfo + routing allow-list (not credentials roles only)
- [ ] Test inbound location PATCH from Hub with a routed CPO party key
- [ ]
GET /ocpi/versionsreachable for health checks
Recommended cutover
Migrate incrementally - one CPO at a time.
- Onboard to Hub - Complete credentials exchange while keeping bilateral links active.
- Enable routing - Ask your account team to enable routing for the first target CPO.
- Certify E2E - Run full session lifecycle via Hub. See Session Lifecycle and eMSP Certification.
- Switch traffic - Move production roaming for that CPO to Hub.
- Decommission P2P - Revoke bilateral credentials for that CPO.
- Repeat for the next CPO.
Do not cut over before routing
Without an active routing rule, you see empty catalogs, authorization returns NOT_ALLOWED, and commands fail.