RequestStopTransaction

RemoteControl CSMS->CS OCPP 2.0.1

Sent by the CSMS to remotely stop an ongoing transaction. Replaces RemoteStopTransaction from OCPP 1.6J.

Quick Reference

Required Fields

transactionId string(36)

ID of the transaction to stop

Example Payload

{
  "transactionId": "txn-abc123"
}

Example Full Frame

[
  2,
  "msg-001",
  "RequestStopTransaction",
  {
    "transactionId": "txn-abc123"
  }
]

Format: [MessageType, MessageId, Action, Payload]

Overview

RequestStopTransaction instructs the Charging Station to stop an active transaction. It replaces RemoteStopTransaction from OCPP 1.6J, with the key change that transactionId is now a string (not an integer).

When to Send

  • When a user requests to stop charging via a mobile app
  • When a backend billing system detects a limit has been reached
  • For emergency stop scenarios

Expected Response

The Charging Station responds with:

  • status: Accepted or Rejected

After a successful response, a TransactionEvent with eventType: "Ended" and transactionInfo.stoppedReason: "Remote" will be sent.

Key Differences from OCPP 1.6J

OCPP 1.6JOCPP 2.0.1
RemoteStopTransactionRequestStopTransaction
transactionId: integertransactionId: string (max 36)

Usage Notes

  • The Charging Station responds Rejected if no active transaction matches the given transactionId
  • After Accepted, wait for the TransactionEvent { eventType: "Ended" } to confirm the stop
  • The Charging Station will send a final meter value in the Ended TransactionEvent

Best Practices

  1. Match the transactionId from TransactionEvent — Use the ID the Charging Station assigned in its Started event
  2. Wait for the Ended event — Don’t consider the transaction closed until the Ended TransactionEvent arrives
  3. Handle Rejected gracefully — The transaction may have already ended naturally

Testing Tips

  • Test stopping an active transaction and verifying the Ended TransactionEvent
  • Test with an invalid transactionId to verify Rejected response
  • Test the stoppedReason in the resulting TransactionEvent is Remote

Common Errors

TypeConstraintViolation

Cause: transactionId is an integer instead of a string

Solution: In OCPP 2.0.1, transactionId is a string (max 36 chars), not an integer like in 1.6J

GenericError

Cause: transactionId does not match any active transaction

Solution: Charging Station should respond with status Rejected if the transactionId is unknown