Hub Receiver Identity (eMSP)

How eMSP receivers authenticate Hub pushes and validate owning-CPO path parties.

When Hub forwards catalog and session data to your platform, inbound calls use the Hub token for auth and the owning CPO's {country_code}/{party_id} in URL paths. Do not validate path parties against credentials roles alone.

For the shared model, see Hub Receiver Identity.

P2P vs Hub

AspectPeer-to-peerVia ChargeIndia Hub
CredentialsOne exchange per counterpartyOne exchange with Hub (HUB role)
Inbound auth tokenCounterparty tokenHub token
Path {cc}/{pid} on catalog/session pushDirect peer's partyOwning CPO
Valid path partiesFrom bilateral credentialsFrom routing + HubClientInfo
Inbound OCPI peerEach counterpartyHub only

Per-module path behavior

ModuleDirectionPath partyNotes
LocationsHub → eMSPCPOSame PUT/PATCH method and body as CPO sent to Hub
TariffsHub → eMSPCPOPUT preserved
SessionsHub → eMSPCPOPUT/PATCH preserved
CDRsHub → eMSPCPO in bodyPOST - no path party
Commands callbackHub → eMSPn/aPOST to eMSP response_url
Token authorizeeMSP → HubCPO in pathHub forwards to owning CPO
CommandseMSP → Hubn/aPOST /commands/{command} - no path party

Location forward example

Concrete request Hub sends to your locations RECEIVER:

PATCH /ocpi/2.2.1/locations/IN/CPO/LOC1/EVSE1
Authorization: Token {hub-token}
Content-Type: application/json

{ "status": "CHARGING", "uid": "EVSE1" }

The path uses CPO identifiers (IN / CPO), not Hub (IN / CIH) and not your eMSP party id.

Requirements

When implementing receivers on your platform:

  1. Authenticate inbound calls with the Hub token from credentials exchange.
  2. Do not require URL {country_code}/{party_id} to match credentials roles.
  3. Accept {cc}/{pid} for any routed CPO - intersect routing rules with parties listed in HubClientInfo.
  4. Poll GET /ocpi/2.2.1/hubclientinfo to build and refresh your CPO allow-list. Hub does not push HubClientInfo; you pull it.
  5. Treat CONNECTED (and optionally PLANNED during pre-provisioning) CPOs as valid path parties.
  6. Make receivers idempotent - Hub may retry on transient failures. See Async Delivery.

Checklist

  • [ ] Location/tariff/session receivers accept CPO {country_code}/{party_id} in URL path
  • [ ] Receiver validation uses HubClientInfo + routing allow-list (not credentials roles only)
  • [ ] Inbound calls authenticated with Hub token only (not per-CPO tokens)
  • [ ] Test inbound location PATCH from Hub with a routed CPO party key

Troubleshooting

SymptomLikely causeFix
Invalid CountryCode & PartyId combination (HTTP 400) on location/tariff/session receiverP2P-style validation: path party must match credentials rolesAccept CPO keys from HubClientInfo + routing; authenticate Hub token
Location push succeeds on Hub but your catalog never updatesReceiver rejecting path partyFix receiver validation per this page
Empty catalog on GETNo routing ruleContact account team to enable routing
Session not receivedMissing cdr_token on CPO session pushAsk the CPO to set eMSP identity on the session

Common migration mistake

In peer-to-peer mode, the authenticated party and the path party are usually the same counterparty. Via Hub, they are different: auth = Hub, path = CPO. This is expected OCPI Hub behavior, not a misconfiguration on the Hub side.