Stop a charge
#
DescriptionWhen a charge has been succesfully stopped or has been rejected by the chargebox, Thor will send a notification to your system. To receive this message you'll have to configure the Stop charge section of the API integration.
If you want to know more about the remote charge workflow, take a look to this guide or this guide.
#
Request formatMethod: POST
Body format: JSON
Key | Type | Description |
---|---|---|
type | String | Specifies that this message is a stop charge notification. For this request it will be always equal to "stop_transaction". |
msg | String | Like "type" specifies the type of the message. It will be always equal to stop . Used only when notifying an unlock connector or a rejected remote stop |
accepted | Boolean | true if the transaction has succesfully finished. |
unlocked | Boolean | true if the connector was unlocked. |
chargebox | String | The chargebox identifier. |
idTag | String | The RFID value or the value generated by the server returned here ("" when unlocked = true ). |
connector | Integer | The connector where the charge has been stopped or rejected. |
transaction_id | Integer | The transaction progressive (0 when accepted = false or unlocked = true ). |
kwh | Integer | The total energy consumed by the vehicle (might be 0 if the chargebox doesn't have a dedicated metering reader for each connector). |
energy | Integer | The total energy consumed by the vehicle (might be 0 if the chargebox doesn't have a dedicated metering reader for each connector). Used only with msg. |
time | Integer | The total time used by the transaction from the start |
payment | Payment | (if available for client) The settings of the payment choosen by client to calculate che total price |
Request schema:
#
Expected responseA nice 200 - OK
is more than enough for Thor.
If you choose the API payment management Thor expects to receive 200 - OK
and the amount in a JSON in this format:
#
How can a charge be stopped?There are 4 way that cause the stop of a charge:
- An API call as described here and here.
- The user has shown the RFID card used to start the charge locally (more info).
- The administrator sent a Stop charge to the chargebox through Thor's administration dashboard.
- The administrator sent an Unlock connector to the chargebox through Thor's administration dashboard.
The difference between the last two points described above is subtle, but basically those are two different OCPP messages, and the unlock connector is more drastic. On Thor we use the Unlock connector feature in case a chargebox keeps rejecting the stop message because something went wrong and we don't want the user to pay for the charge.