StopTransaction

Core CP->CSMS

Sent by the Charge Point when a charging transaction ends.

Quick Reference

Required Fields

meterStop integer

Meter value in Wh at end of transaction

timestamp dateTime

Timestamp when transaction stopped

transactionId integer

Transaction ID from StartTransaction response

Optional Fields

idTag string(20)

Identifier that stopped the transaction (may differ from starter)

reason string

Reason for stopping (e.g., EVDisconnected, Local, Remote, PowerLoss)

transactionData array

Meter values during the transaction

Example Payload

{
  "transactionId": 12345,
  "meterStop": 15750,
  "timestamp": "2024-01-15T12:45:00Z",
  "reason": "Local",
  "idTag": "AABBCCDD"
}

Example Full Frame

[
  2,
  "msg-001",
  "StopTransaction",
  {
    "transactionId": 12345,
    "meterStop": 15750,
    "timestamp": "2024-01-15T12:45:00Z",
    "reason": "Local",
    "idTag": "AABBCCDD"
  }
]

Format: [MessageType, MessageId, Action, Payload]

Overview

The StopTransaction message notifies the Central System that a charging transaction has ended. This finalizes the transaction record with total energy delivered and reason for stopping.

When to Send

  • When user stops charging (via RFID, app, or button)
  • When cable is disconnected after charging
  • After RemoteStopTransaction command
  • When charging completes (vehicle battery full)
  • On error conditions (power loss, emergency stop)

Expected Response

The CSMS responds with an optional IdTagInfo object (if idTag was provided in request).

Usage Notes

  • The meterStop must be >= meterStart from StartTransaction
  • Energy delivered = meterStop - meterStart (in Wh)
  • The reason field helps with analytics and troubleshooting
  • transactionData can include sampled meter values during the transaction (alternative to MeterValues messages)

Best Practices

  1. Accurate meter readings - Ensure meterStop is the actual final meter value
  2. Include reason - Always specify why transaction stopped for better diagnostics
  3. Stopping idTag - Include idTag if user presented tag to stop (helps with authorization tracking)
  4. Transaction data - Include critical meter values if MeterValues wasn’t sent during charging
  5. Persist before sending - Save transaction data locally before sending to prevent data loss

Common Stop Reasons

  • Local: User stopped via Charge Point interface
  • Remote: Stopped via RemoteStopTransaction
  • EVDisconnected: Cable disconnected
  • PowerLoss: Charge Point lost power
  • EmergencyStop: Emergency button pressed
  • DeAuthorized: Authorization revoked during charging
  • Other: Any other reason

Testing Tips

  • Test normal stop flow with valid transactionId
  • Test with different stop reasons
  • Test meter value validation (meterStop >= meterStart)
  • Test without optional idTag field
  • Test with transactionData array containing meter samples

Common Errors

PropertyConstraintViolation

Cause: Invalid transactionId

Solution: Use the transactionId from StartTransaction response

TypeConstraintViolation

Cause: meterStop is not an integer

Solution: Ensure meter value is in Wh as integer

GenericError

Cause: Transaction not found or already stopped

Solution: Verify transactionId is correct and transaction is active