- Start and stop remote charging sessions
- View charging session history
- Get session details and receipts
- Retry failed payments
Remote charging
To start a charging session remotely, use the endpoints described below. After starting or stopping a session, you should listen to Session Events to get updates about:- session started
- session failed to start
- session stopped
- session finished
That means that you might receive events such as
SESSION_STOPPED or SESSION_COMPLETED without calling the Drive API.
Remarks
- The order of events doesn’t always follow the sequence outlined in the Statuses section. Events can occur in any order or be skipped entirely. Always consider the most recent update for the accurate status of the session.
- Only chargers with
REMOTE_START_STOP_CAPABLEcapability can be started and stopped remotely. - Do not limit the possibility to start charging only to chargers in the
AVAILABLEstatus. There can be a delay between status updates, so a charger might be available even if it still shows “OCCUPIED”. - A session might stay in a certain state (like
WAITING_TO_STARTorSTOP_FAILED) for a long time. Ensure your product handles this appropriately and doesn’t block the user from starting a session again in such cases. - After starting a session, all subsequent tries within the next 60 seconds on the same connector are blocked to avoid spamming the CPO with requests. Consider this when designing your integration.
- It is possible to have two or more ongoing sessions simultaneously.
- Once a session is completed and priced, a CDR (Charge Detail Record) is sent.
Possible problems
Connections with chargers are not always reliable and stable. Therefore, some errors may occur when using remote start/stop:-
Session Starting Delays:
- Starting a session can take some time. Allow up to two minutes for the session to transition from
WAITING_TO_STARTtoSTARTED. Some chargers only unlock the cable after starting, so it will stay inWAITING_TO_STARTuntil the user connects the cable to their car. - If a charger can’t start a session due to connectivity problems or issues with connecting to the car, wait at least one minute before allowing the user to attempt starting a session again.
- If a session stays in
WAITING_TO_STARTfor more than two minutes, consider it failed and allow starting another one.
- Starting a session can take some time. Allow up to two minutes for the session to transition from
-
Session Failures:
- If the charger didn’t receive the stop request and charging continues while the session is marked as failed, the user should be able to send a STOP request again.
- If a session stays in
STOP_FAILEDstatus for a few minutes, the user should still be able to start another session. - If a charger received a stop request but a timeout occurred and the session is marked as
STOP_FAILED, another event about the session being stopped or completed should follow.
-
Mixed Session Outcomes:
- It is possible to receive a
SESSION_START_FAILEDevent followed by aSESSION_COMPLETEevent and have a successful charging session. This can happen if there are connection issues between the charging point operator (CPO) and the charger, but the charger was still able to charge. - If a session doesn’t stop correctly after a few tries, allow the user to abandon the session so that it is possible to start another one.
- It is possible to receive a
Start remote session
API Reference Start a remote charging session for a given user on a given connector id. The response from this endpoint will always include a session id regardless if the start was successful or not (all session attempts are stored).You should store that session id to be able to check its status, stop charging, etc.
Stop remote session
API Reference Stop a remote charging session given its session id. Only sessions started remotely can be remotely stopped.Remotely started sessions have the
chargingKeyType field set to virtual.
Calling this endpoint with a session id pointing to an already stopped session will not cause any harm, a 200 - OK response will be returned again.
Session statuses
The status Enum should be designed to accept unknown values. In case a new status is introduced, handle these unknown values as FAILED.CREATED– transitive state that indicates that Plugsurfing created the session. It remains for a very short timeWAITING_TO_START– indicates that Plugsurfing asked the CPO to start a remote session (only for Remote Charging)STARTED– indicates that the session is ongoingWAITING_TO_STOP– indicates that Plugsurfing asked the CPO to stop a remote session (only for Remote Charging)STOP_FAILED– indicates that stopping the remote session failed (only for Remote Charging). A new stop request can be retried.STOPPED– indicates that the session has ended, but the CDR was not yet receivedCOMPLETE– indicates that the session is fully completed and priced. Use thebalanceStatusand thebalanceAmountMinorto assess if the payment is currently successful or not.FAILED– indicates that the session couldn’t be startedREFUNDED– indicates that the session payment was refunded to the userUNKNOWN– indicates an unrecognized status. It should be treated the same as FAILED

Session statuses flow
Get Session history
API Reference The session history API allows you to:- View all charging sessions of a given user
- Filter by charging key, date range, and status
- Get session details like energy consumed, duration and cost
Get session by id
API Reference Retrieve a session details by its id. The response will indicate whether the session is starting, started, failed, or complete. When a session is complete, you will also have an additional field calledbalanceStatus which will give you the payment state as one of 4 options (PROCESSING, PAID, DEBT, REFUND).
Example of session in STARTED state:
Get a session receipt by sessionId
API Reference Retrieve a session receipt URL. The receipt will be in PDF format.Testing remote charging
To test remote charging, you should start charging sessions on specific connectors in our the stage environment. Here are the steps required to test remote charging:- Find a charger via geosearch
- Select an available charger and get its connector id
- Start the session
- Wait a desired amount of time
- Stop the session
Successful session
Firstly, search for available locations around the following coordinates with the Geosearch radius endpoint:AVAILABLE status and start a session:
Error case
There is one location designated for simulating errors, it is located at:- Waiting to start hanging:
DE*DRV*E6mayTt - Stop ignored (rejected):
DE*DRV*E4JanRe - Start fails:
DE*DRV*E9svnVs - Stop fails:
DE*DRV*E8vsnVn
1. Waiting to start hanging:
- Select any connector id from evse_id
DE*DRV*E6mayTtand initiate a charging session - Obtain the session id from the response and get session details using session API request
- Status of charging should be
WAITING_TO_START
Example request
2. Stop ignored (rejected):
- Select any connector id from evse_id
DE*DRV*E4JanReand initiate a charging session - Obtain the session id from the response and trigger a stop session
- Enter the same session id in the Get session by ID endpoint request and check the status
- Status of charging should still be
STARTEDas stop request is ignored
3) Start fails:
- Select any connector id from evse_id
DE*DRV*E9svnVsand initiate a charging session - Obtain the session id from the response and get session details using session API request
- Status of charging should be
FAILEDas starting a charging session failed
4) Stop fails:
- Select any connector id from evse_id
DE*DRV*E8vsnVnand initiate a charging session - Obtain the session id from the response and trigger a stop session
- Enter the same session id in get session API request and check the status
- Status of charging should be
STOP_FAILEDas stop request fails