If you have ever tried to test an OCPP integration, you know the frustration: the spec describes every field in prose, but nowhere does it just hand you a working message you can paste into a socket and watch respond. This article is that missing reference: a set of ready-to-use OCPP-J JSON samples for the messages you actually send day to day, with the wire frame explained so you know what you are pasting.

Every sample here is a complete frame. To see them in order, play the walkthrough in the charging session guide. To send them to a real CSMS and watch it reply, use Rey, the virtual charge point: its Step-by-step mode holds each message so you can edit it before it goes. That loop of sending a CALL and reading the CALLRESULT is the fastest way to build a mental model of the protocol. If you are new to OCPP entirely, start with what OCPP is and how it works first, then come back here for the payloads.
The wire frame: the part everyone gets wrong first
OCPP-J does not send bare payload objects. Every message rides inside a JSON array. This is the single most common mistake people make hand-crafting their first message. They send {"chargePointVendor": ...} on its own and the server drops it silently.
A request (called a CALL) looks like this:
[2, "19223201", "BootNotification", { ...payload... }]
The four elements are:
- MessageTypeId.
2for a CALL (request),3for a CALLRESULT (successful response),4for a CALLERROR. - UniqueId. A string you choose that ties the response back to this request. The server echoes it in its reply. Use something unique per message.
- Action. The message name, e.g.
BootNotification. Present only on CALLs, not on responses. - Payload. The JSON object with the actual fields.
A successful response (CALLRESULT) drops the Action and uses type 3:
[3, "19223201", { "currentTime": "2026-07-12T10:05:00Z", "interval": 300, "status": "Accepted" }]
Notice the UniqueId 19223201 matches the request. In 1.6 it can be any string up to 36 characters; a UUID is the safe default. That is how you correlate them on a busy connection. An error response (CALLERROR, type 4) carries an error code, a human-readable description, and a details object instead of a payload:
[4, "19223201", "FormationViolation", "Payload failed schema validation", {}]
You will see CALLERROR most often for FormationViolation (renamed FormatViolation in 2.0.1), where the payload is not valid JSON or not shaped as the action expects (a missing required field is OccurenceConstraintViolation and a wrong type is TypeConstraintViolation), then for NotImplemented where the receiver does not know the action at all, and for SecurityError. When a message you paste comes back as a type-4 frame, the description string is your fastest clue to what to fix. Get this outer frame right and the payloads below are the easy part.
All payloads below are OCPP 1.6, the version most chargers in the field still speak, and together they cover the whole 1.6 Core profile: the sixteen messages every 1.6 charger and CSMS must support. The 2.0.1 versions of the most common ones are at the end. Each one has been checked against the official 1.6 JSON schemas.
BootNotification
The first message a charger sends after the WebSocket connects. It announces the hardware and asks the CSMS for permission to operate.
[2, "boot-001", "BootNotification", {
"chargePointVendor": "ACME",
"chargePointModel": "HomeCharger-22",
"chargePointSerialNumber": "SN-000123",
"firmwareVersion": "1.4.2",
"iccid": "89014103211118510720",
"imsi": "310170845466094"
}]
Only chargePointVendor and chargePointModel are mandatory in 1.6; the rest are optional but commonly sent. The response, shown in the wire-frame section above, tells the charger whether it is Accepted, Pending, or Rejected, plus the Heartbeat interval and the server’s clock. For the full breakdown of what each status means and the failure modes behind them, see the BootNotification message deep-dive.
Heartbeat
The keep-alive. The charger sends it at the interval the CSMS returned in the BootNotification response, and the server replies with its current time so the charger can keep its clock synced.
[2, "hb-042", "Heartbeat", {}]
Yes, the payload is an empty object. It still has to be there. The response:
[3, "hb-042", { "currentTime": "2026-07-12T10:10:00Z" }]
StatusNotification
Reports the state of a connector: available, occupied, charging, faulted, and so on. The CSMS relies on this to know whether a connector can accept a session.
[2, "status-007", "StatusNotification", {
"connectorId": 1,
"errorCode": "NoError",
"status": "Available",
"timestamp": "2026-07-12T10:11:00Z"
}]
The CSMS answers with an empty payload: [3, "status-007", {}]. A faulted connector carries a real errorCode and, optionally, the vendor’s own code:
[2, "status-008", "StatusNotification", {
"connectorId": 1,
"errorCode": "GroundFailure",
"status": "Faulted",
"vendorId": "com.acme",
"vendorErrorCode": "GF-12",
"timestamp": "2026-07-12T10:11:30Z"
}]
A connectorId of 0 refers to the charge point as a whole rather than a specific connector, which is how a station-wide fault gets reported. When a driver plugs in, you will typically see a transition to Preparing, then Charging, then Finishing, and back to Available.
Authorize
Sent when a driver presents an RFID card or app token, asking the CSMS whether that identifier is allowed to charge.
[2, "auth-100", "Authorize", { "idTag": "04A1B2C3D4E5F6" }]
The response wraps the decision in an idTagInfo object:
[3, "auth-100", { "idTagInfo": { "status": "Accepted" } }]
Other statuses are Blocked, Expired, Invalid and ConcurrentTx (the tag is already in use in another session). A parentIdTag and expiryDate can also appear inside idTagInfo.
StartTransaction
Opens a charging session. Sent after authorization succeeds and the vehicle is ready to draw power. The meterStart is the meter reading in Wh at the instant charging begins, and it is one of the two anchors billing depends on.
[2, "start-200", "StartTransaction", {
"connectorId": 1,
"idTag": "04A1B2C3D4E5F6",
"meterStart": 120450,
"timestamp": "2026-07-12T10:12:00Z"
}]
The server assigns a transactionId in its response, which you then quote in every MeterValues and StopTransaction message for the session:
[3, "start-200", { "transactionId": 12345, "idTagInfo": { "status": "Accepted" } }]
MeterValues
The stream of energy and telemetry readings during a session. This is the data your billing and dashboards depend on, and its nested shape trips people up. Note the two levels: meterValue (readings at a timestamp) and sampledValue (measurands within that reading).
[2, "meter-300", "MeterValues", {
"connectorId": 1,
"transactionId": 12345,
"meterValue": [
{
"timestamp": "2026-07-12T10:20:00Z",
"sampledValue": [
{
"value": "125300",
"context": "Sample.Periodic",
"measurand": "Energy.Active.Import.Register",
"unit": "Wh"
},
{
"value": "11000",
"context": "Sample.Periodic",
"measurand": "Power.Active.Import",
"unit": "W"
}
]
}
]
}]
The response is simply [3, "meter-300", {}], an empty acknowledgement. For the full list of measurands, contexts, and the implementation variance that causes real support tickets, see the MeterValues message deep-dive.
StopTransaction
Closes the session. The meterStop minus the meterStart from StartTransaction gives the total energy delivered.
[2, "stop-400", "StopTransaction", {
"transactionId": 12345,
"idTag": "04A1B2C3D4E5F6",
"meterStop": 133800,
"timestamp": "2026-07-12T10:45:00Z",
"reason": "Local"
}]
Common reason values include Local (driver ended it at the charger), Remote (ended from the CSMS or app), EVDisconnected, and PowerLoss. The optional transactionData field can carry the final Transaction.End meter readings. The response may carry an idTagInfo if the stop included an idTag:
[3, "stop-400", { "idTagInfo": { "status": "Accepted" } }]
RemoteStartTransaction (CSMS to charger)
Not every message flows charger-to-server. When a driver taps “start” in an app, the CSMS sends a CALL to the charger:
[2, "remote-500", "RemoteStartTransaction", {
"connectorId": 1,
"idTag": "04A1B2C3D4E5F6"
}]
The charger replies Accepted or Rejected:
[3, "remote-500", { "status": "Accepted" }]
On acceptance it proceeds through its normal StatusNotification and StartTransaction flow. This bidirectional nature is why the UniqueId matters so much: on a live socket, requests are flying in both directions and the ID is what keeps responses matched to their calls.
RemoteStopTransaction
The CSMS stops a session by its transactionId, the integer it assigned in the StartTransaction response:
[2, "rstop-510", "RemoteStopTransaction", { "transactionId": 12345 }]
[3, "rstop-510", { "status": "Accepted" }]
Accepted only means the charger will try. The session is over when StopTransaction arrives with reason Remote. The remote start and stop guide covers the failure cases.
Reset
Soft restarts the software and stops transactions gracefully; Hard is a full reboot.
[2, "reset-600", "Reset", { "type": "Soft" }]
[3, "reset-600", { "status": "Accepted" }]
After the reset, expect a new BootNotification on a fresh WebSocket connection.
ChangeAvailability
Takes a connector, or the whole charger with connectorId 0, in or out of service. type is Inoperative or Operative.
[2, "avail-700", "ChangeAvailability", { "connectorId": 2, "type": "Inoperative" }]
[3, "avail-700", { "status": "Scheduled" }]
Scheduled means a session is running on that connector and the change happens when it ends. The other answers are Accepted and Rejected.
GetConfiguration and ChangeConfiguration
Read configuration keys by name, or send an empty key list (or omit it) to get every key:
[2, "getconf-800", "GetConfiguration", { "key": ["HeartbeatInterval", "MeterValueSampleInterval", "NoSuchKey"] }]
[3, "getconf-800", {
"configurationKey": [
{ "key": "HeartbeatInterval", "readonly": false, "value": "300" },
{ "key": "MeterValueSampleInterval", "readonly": false, "value": "60" }
],
"unknownKey": ["NoSuchKey"]
}]
Every value is a string, even numbers. Change one key per request:
[2, "setconf-801", "ChangeConfiguration", { "key": "MeterValueSampleInterval", "value": "30" }]
[3, "setconf-801", { "status": "Accepted" }]
The other answers are Rejected, RebootRequired (stored, takes effect after a reboot) and NotSupported (unknown key).
ClearCache
Empties the charger’s authorization cache, so the next card presented is checked with the CSMS again. The payload is empty.
[2, "cache-900", "ClearCache", {}]
[3, "cache-900", { "status": "Accepted" }]
UnlockConnector
Asks the charger to release a stuck cable on one connector. On 1.6, a running transaction on that connector is stopped first.
[2, "unlock-950", "UnlockConnector", { "connectorId": 1 }]
[3, "unlock-950", { "status": "Unlocked" }]
The other answers are UnlockFailed and NotSupported. More in the UnlockConnector guide.
DataTransfer
The vendor extension point, usable in both directions. In 1.6 data is a string, so structured data travels JSON-encoded:
[2, "dt-980", "DataTransfer", {
"vendorId": "com.acme",
"messageId": "CableTemperature",
"data": "{\"celsius\":41.5}"
}]
[3, "dt-980", { "status": "Accepted" }]
The other answers are Rejected, UnknownMessageId and UnknownVendorId. See DataTransfer and vendor extensions for how this changes in 2.0.1.
CALLERROR examples
A CALLERROR answers a CALL the receiver couldn’t process at all. Two you will meet early. A StartTransaction missing its required meterStart:
[4, "start-201", "OccurenceConstraintViolation", "Required field meterStart is missing", {}]
And a 1.6 charger receiving an action it doesn’t implement, here a 2.0.1 message name:
[4, "req-17", "NotImplemented", "Unknown action RequestStartTransaction", {}]
| Error code (1.6) | 2.0.1 name | Meaning |
|---|---|---|
| NotImplemented | NotImplemented | Action is not known |
| NotSupported | NotSupported | Action is known but not supported |
| InternalError | InternalError | Receiver failed while processing |
| ProtocolError | ProtocolError | Payload incomplete |
| SecurityError | SecurityError | Receiver refuses for security reasons |
| FormationViolation | FormatViolation | Payload is not valid JSON or not the right structure |
| PropertyConstraintViolation | PropertyConstraintViolation | A field has an invalid value |
| OccurenceConstraintViolation | OccurrenceConstraintViolation | A required field is missing, or a field appears too often |
| TypeConstraintViolation | TypeConstraintViolation | A field has the wrong data type |
| GenericError | GenericError | Anything else |
| (none) | MessageTypeNotSupported | Unknown MessageTypeId |
| (none) | RpcFrameworkError | Frame itself is malformed, for example the id is not a string |
Note the spelling: 1.6 writes OccurenceConstraintViolation with one “r”, and 2.0.1 corrected it. A CSMS that matches error codes by string needs both. OCPP 2.1 also adds two new message types, CALLRESULTERROR (5) and SEND (6), but 1.6 and 2.0.1 use only 2, 3 and 4.
A note on OCPP 2.0.1
The outer frame is identical in 2.0.1, the same [2, id, action, payload] array. The payloads change. Most visibly, StartTransaction and StopTransaction disappear, replaced by a single TransactionEvent message that carries Started, Updated, and Ended event types with meter readings embedded inside. Field names get tidied and grouped into nested objects. Here is the 2.0.1 BootNotification:
[2, "boot-201", "BootNotification", {
"reason": "PowerUp",
"chargingStation": {
"vendorName": "ACME",
"model": "HomeCharger-22",
"serialNumber": "SN-000123",
"firmwareVersion": "2.1.0"
}
}]
[3, "boot-201", { "currentTime": "2026-07-12T10:05:00Z", "interval": 300, "status": "Accepted" }]
And the 2.0.1 equivalent of StartTransaction, a TransactionEvent Started. The station creates the transactionId (a string) itself rather than waiting for the CSMS to assign one:
[2, "tx-202", "TransactionEvent", {
"eventType": "Started",
"timestamp": "2026-07-12T10:12:00Z",
"triggerReason": "Authorized",
"seqNo": 0,
"transactionInfo": { "transactionId": "f3b2c1d0-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "chargingState": "EVConnected" },
"evse": { "id": 1, "connectorId": 1 },
"idToken": { "idToken": "04A1B2C3D4E5F6", "type": "ISO14443" },
"meterValue": [{
"timestamp": "2026-07-12T10:12:00Z",
"sampledValue": [{ "value": 120450, "context": "Transaction.Begin", "measurand": "Energy.Active.Import.Register" }]
}]
}]
[3, "tx-202", { "idTokenInfo": { "status": "Accepted" } }]
Note that value in a 2.0.1 sampledValue is a number, where 1.6 uses a string. How the 1.6 Core messages map:
| OCPP 1.6 | OCPP 2.0.1 |
|---|---|
| StartTransaction, StopTransaction, and MeterValues during a session | TransactionEvent (Started, Updated, Ended) |
| RemoteStartTransaction, RemoteStopTransaction | RequestStartTransaction, RequestStopTransaction |
| GetConfiguration, ChangeConfiguration | GetVariables, SetVariables (plus GetBaseReport for everything) |
| ClearCache, Reset, ChangeAvailability, UnlockConnector, DataTransfer, Heartbeat, Authorize, BootNotification, StatusNotification | Same names, reshaped payloads (Reset’s Hard and Soft become Immediate and OnIdle) |
The deep dive on TransactionEvent in 2.0.1 has the full session. If you are deciding which version to build against, the OCPP version comparison walks through what actually changed and why.
Put them to work
Reading JSON is one thing; watching a server respond is another. Open Rey in Step-by-step mode, edit the held messages to match these frames with your own IDs and timestamps, and step through a full session: BootNotification, Heartbeat, StatusNotification, Authorize, the start of the transaction, a few meter values, and the stop. Once you have driven that sequence by hand a couple of times the protocol stops feeling abstract. You will recognise every frame on a real connection, and more usefully, you will know which element to look at first when one of them is wrong.