OCPI library

Early access

Plug your platform into the whole OCPI stack

For teams starting an OCPI integration. Hand the library your locations, sessions and tokens. It runs the handshake, every module your role needs and every version your partners speak.

From the team behind ChargerDojo's OCPI 2.1.1, 2.2.1 and 2.3.0 conformance tests

Planned interfaceTypeScript
// ChargerDojo OCPI library, planned interface const ocpi = createOcpiNode({  role: 'CPO',  versions: ['2.2.1', '2.3.0'],  credentials: partnerStore,  locations: { list: db.locations.page, get: db.locations.byId },  sessions:  { list: db.sessions.page },  tokens:    { authorize: auth.check },}); app.use('/ocpi', ocpi.routes); await ocpi.push.session(session); // checked before it leaves
Todaychargerdojo_validate_payload
Not a valid OCPI 2.2.1 session object: 1 problem.- (the object itself): must have required property 'kwh'
The interface is a design for early access teams to shape. The answer below is what ChargerDojo's payload validator says today about a 2.2.1 Session sent without kwh.

You write the data. It speaks OCPI.

Every OCPI platform repeats the same handshake, routing and paging. Only your data is yours to write.

Your code
You own

  • Read and write your locations, sessions, CDRs, tariffs and tokens
  • Decide who may charge
  • Keep partner credentials where you keep secrets

The library
It handles

  • The versions and credentials handshake with each partner
  • Routes for every module your role serves
  • Pagination, Link headers and OCPI status codes
  • Pushing updates, and serving the reads a partner makes to catch up after an outage
Each partner on its own versioneMSP partner2.2.1Roaming hub2.3.0eMSP partner2.1.1

Your AI writes the code. Who reads the spec?

AI-assisted coding makes the first draft of an OCPI module cheap. Whether it works depends on reading the spec closely: what each clause requires, what it leaves unsaid, how 2.1.1, 2.2.1 and 2.3.0 differ, and where real partners stray from it.

In our view, keeping this right in house takes a team even with AI: engineers, a tech lead, and a product manager for partner onboarding, spec questions, certification and each new OCPI version.

The library's job is to stay correct across versions and partners, and to prove it with checks that can fail.

A first draft that looks right
// The push failed: queue it and try again laterretryQueue.add(() => partner.putSession(session));

OCPI messages SHOULD NOT be queued. When a client does a POST, PUT or PATCH request and that request fails or times out, the client should not queue the message and retry the same message again later.

OCPI 2.2.1 · Transport and format · Offline behaviour
After an outage, the receiving side catches up with GET. The library sends the push once and serves those reads.

Built on checks that can fail

ChargerDojo grades OCPI 2.1.1, 2.2.1 and 2.3.0 implementations today. Every conformance check runs against peers broken on purpose for each version, and a check none of them can turn red fails our build. The library will hold your side to the same rules before a partner sees it.

How a red result is proven

2.1.1

Graded today

2.2.1

Graded today

2.3.0

Graded today

Three of the mutations our peers carry

  • accepts-any-token
  • accepts-reregistration
  • success-code-on-rejection

Tell us what to build first

Early access teams choose the first role, language and versions. Your answers shape the pilot we offer, and we reply to every team whose scope fits it.

  1. You send your scope

    Role, versions, language and when you need it.

  2. We read every request

    The answers shape the pilot we offer.

  3. We email teams that fit

    To arrange a call about a paid pilot.

Request early access

Every question needs an answer unless marked optional.

What your organisation builds
OCPI roles you need (choose any)
OCPI versions (choose any)
Language your OCPI code runs in
When you need it in production

Read our privacy policy.

Checking verification...

No account or paid plan needed.

Frequently asked questions

Can I install it today?

No. The library is in early access, and nothing ships until the first teams confirm its scope.

More detail

The payload tools above work today.

Which language comes first?

The one the first early access teams need.

More detail

The form lists TypeScript, Java or Kotlin, Python, C# and Go; for another, choose Other and name it.

Which roles and versions?

Tell us in the form.

More detail

ChargerDojo already tests OCPI 2.1.1, 2.2.1 and 2.3.0, and tests CPO, eMSP, hub and payment terminal implementations at the versions that define each role, so the planned library can start with any of them.

How does it compare with a free OCPI library?

The planned library comes with support, upgrades to the next OCPI version, and rules taken from checks proven to fail on broken peers.

Does it replace ChargerDojo testing?

No. The library is for teams starting an OCPI integration, and ChargerDojo testing is for teams with an implementation to prove.

More detail

The library would keep your side to the rules. Testing runs that implementation against a counterparty that misbehaves on purpose.

What does it cost?

Pricing is agreed with each early access team.

What happens after I send the form?

We read each early access request.

More detail

If your scope fits the first pilot, we email you to arrange a call.