Skip to main content
POST
/
v3
/
public-charging
/
sessions
Start Public Charging Session
curl --request POST \
  --url https://app.plugchoice.com/api/v3/public-charging/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "connector_id": 123,
  "email": "<string>"
}
'
{
  "session_token": "<string>",
  "data": {
    "status": "<string>",
    "failure_reason": "<string>",
    "connector_id": 123,
    "connector_status": "<string>",
    "charger": {
      "public_code": "<string>",
      "name": "<string>",
      "online": true
    },
    "pricing": {
      "currency": "<string>",
      "price_per_kwh": 123,
      "start_fee": 123
    },
    "amount_authorized": 123,
    "energy_kwh": "<string>",
    "cost_amount": 123,
    "amount_captured": 123,
    "tax_amount": 123,
    "driver_email": "<string>",
    "created_at": "<string>",
    "authorized_at": "<string>",
    "charging_started_at": "<string>",
    "completed_at": "<string>",
    "captured_at": "<string>"
  },
  "payment": {
    "client_secret": "<string>",
    "publishable_key": "<string>",
    "stripe_account_id": "<string>"
  }
}
Starts a public charging session on a charger’s connector and creates the Stripe pre-authorization. This endpoint does not require authentication and is rate limited to 3 requests per minute per IP address. Each charger also accepts a limited number of successful sessions per hour; exceeding it returns 429. Returns 404 if the charger is unknown or does not have public charging available, 400 if the charger is offline, 422 if the connector is unknown, and 409 if the connector is unavailable.
code
string
required
The public code of the charger. Case-insensitive. Maximum 10 characters.
connector_id
integer
required
The connector ID to start charging on. Must be between 1 and 100.
email
string
The driver’s email address for the receipt. Optional. Must be a valid email, maximum 255 characters.

Response

Returns 201 Created.
session_token
string
The session token. Use it as the {token} path parameter to poll, confirm, stop, or cancel the session. Treat it as a credential.
data
object
The session details.
payment
object
The Stripe payment context used to confirm the pre-authorization in the browser.