Async Delivery

How ChargeIndia Hub forwards sessions and CDRs asynchronously to eMSPs.

Sessions and CDRs follow an async push model on ChargeIndia Hub. eMSPs do not pull these from the Hub — the Hub worker delivers them to your receiver endpoints.

How it works

flowchart LR
  CPO[CPO pushes to Hub] --> HubAPI[hub-api stores]
  HubAPI --> Queue[SQS queue]
  Queue --> Worker[worker forwards]
  Worker --> eMSP[eMSP receiver]
  1. CPO pushes session (PUT) or CDR (POST) to Hub API
  2. Hub stores the record and enqueues a forward job
  3. Worker resolves the target eMSP from cdr_token and routing rules
  4. Worker calls the eMSP's receiver endpoint with the payload

What is pushed asynchronously

DataCPO actioneMSP receives
Session updatesPUT /sessions/{cc}/{pid}/{id}PUT to eMSP sessions module
CDRsPOST /cdrsPOST to eMSP CDRs module

Receiver requirements

eMSPs must implement and register:

PUT  /ocpi/2.2.1/sessions/{country_code}/{party_id}/{session_id}
POST /ocpi/2.2.1/cdrs

Provide these URLs to your account team during onboarding.

There is no GET /sessions or GET /cdrs on the Hub for eMSPs. If your receiver is down, data is retried — but you cannot backfill by polling the Hub.

Routing dependency

Async delivery requires:

  1. Valid cdr_token on the session/CDR identifying the eMSP
  2. Active routing rule for the eMSP↔CPO pair
  3. Configured eMSP receiver URL in the Hub registry

Latency and retries

MetricTarget
Hub → eMSP delivery (p95)< 5 seconds
Retry on failureYes — via queue with backoff

If delivery fails repeatedly, contact your account team. Undelivered messages may end up in a dead-letter queue for manual re-drive.

Idempotency

Design your session and CDR receivers to be idempotent. The Hub may retry delivery on transient failures. Use session_id and CDR id as deduplication keys.

Related docs