Start a test session on a bench charger

post/v1/sessions
Requires an API key

Leases a free OCPP bench charger (one per workspace), plugs in its simulated EV, creates a bill on the bench tenant, authorizes it and starts charging through the bill start path. 409 lease_active when the workspace already holds a charger; 409 pool_exhausted with Retry-After when every charger is leased; 409 bench_unavailable where this environment has no bench. Retry with the same Idempotency-Key to continue an interrupted start. target (GET /v1/sessions/targets) connects the charger through the project's per-project URL, one of its ready custom OCPP domains or a custom URL instead (stations:write on target.tenant_id; custom URLs for signed-in users only, one active lease each, 10 starts per hour, audited): a connection session, status connecting then connected or connect_failed with target.error; nothing is billed on the bench and charging is driven from that system. Runs on an EVerest charger of the OCPP bench through real OCPP: never a physical charger at a site, never live Stripe.

Headers

  • idempotency-keystring
    Default ""

Request body

  • providerenum
    simulator authorizes at once; stripe opens a hosted checkout on the Stripe platform account where this environment allows test payments, never a live one.
    One of simulator, stripe · Default "simulator"
  • targetobject | null
    Where the bench charger connects; the global endpoint when omitted. Other targets run a connection session: the charger connects there and you drive charging from that system.
    Child attributes
    • idstringRequired
      A target id from GET /v1/sessions/targets: global, project_url, domain:<domain id> or custom_url.
      Pattern ^(global|project_url|custom_url|domain:[A-Za-z0-9_]{1,64})$
    • tenant_idinteger | null
      The project whose address the charger uses; required except for global.
      Greater than 0
    • urlstring | null
      custom_url only: ws:// or wss://, port 80, 443 or 8000-9999, no user name or password.
      5–512 characters
    • identitystring | null
      custom_url only: the OCPP identity the bench charger uses at that system, appended to the URL. Kept in memory for the lease only and shown masked.
      Pattern ^[A-Za-z0-9._-]{1,48}$
    • passwordstring (password) | null
      custom_url only: the Basic authentication password for that identity. Kept in memory for the lease only; never stored, logged or returned.
      1–128 characters

Returns · 201

  • idstringRequired
  • workspace_idstringRequired
  • statusenumRequired
    starting: the bill start was dispatched and no transaction matched yet. stopped: the transaction completed; settle next. operator_required: the bill could not be captured (last_error, for example bill_exceeds_hold); the charger is already released and Ivora staff settle it. Connection sessions (a target other than global): connecting, then connected, or connect_failed (target.error; the charger is restored to its default), and ended once canceled, idle or at its maximum age.
    One of preparing, awaiting_payment, starting, start_failed, charging, stopping, stopped, settling, completed, canceling, canceled, operator_required, connecting, connected, connect_failed, ended
  • providerenumRequired
    One of simulator, stripe
  • payment_modestringRequired
  • chargerChargerRecordRequired
    Child attributes
    • idstringRequired
      The bench charger leased for this session.
    • tenant_idintegerRequired
      The OCPP bench tenant, which owns the station, bill and payment.
    • station_idintegerRequired
    • connector_idintegerRequired
      Connector resource ID on the bench station.
    • evseinteger | nullRequired
      The charger's EVSE the simulated EV plugs into.
    • stateobject | nullRequired
      While leased: ocpp_status (the connector's last OCPP StatusNotification) and online.
  • leaseLeaseRecordRequired
    Child attributes
    • statusenumRequired
      releasing: the simulated EV is being unplugged before the charger is freed.
      One of active, releasing, released
    • idle_expires_atstring | nullRequired
      While active: when the idle sweep ends the session unless it is read or changed before.
    • expires_atstring | null
      While active: the lease's maximum age (30 minutes by default), after which the sweep stops, settles and releases however active the session is.
    • released_atstring | nullRequired
    • release_reasonstring | nullRequired
      settled, canceled, idle, max_age, operator, payment_canceled or stop_timeout.
  • bill_idstring | nullRequired
  • payment_idstring | nullRequired
  • transaction_idinteger | nullRequired
    Transaction resource ID of the real OCPP transaction.
  • transaction_activeboolean | nullRequired
  • energy_whinteger | nullRequired
    Integer Wh, derived once from the core's kWh.
  • energy_kwhstring | nullRequired
    Decimal kWh as the charging core stores it.
  • power_winteger | nullRequired
  • metered_atstring | nullRequired
  • estimated_minorinteger | nullRequired
    Bill estimate at the tariff rate; equals total_minor once final.
  • total_minorinteger | nullRequired
    Final bill, fixed at settlement.
  • rate_minorstring | nullRequired
    Minor units per kWh, snapshotted from the bench tariff.
  • hold_minorinteger | nullRequired
  • refunded_minorintegerRequired
    Minimum 0
  • currencystringRequired
  • billing_versionstringRequired
  • running_costobject | nullRequired
    What the charger's own display shows; null when the charger cannot be read or the session holds no charger.
    Child attributes
    • displayedbooleanRequired
      False until the charger shows a RunningCost or FinalCost stamped after this session's transaction started.
    • statusstring | null
      Running, or Finished after FinalCost.
    • coststring | null
      Major currency units as the charger stores them (it truncates to its decimals).
    • cost_minorinteger | null
      The same amount in units of 10^-cost_decimals.
    • cost_decimalsinteger | null
    • meter_whinteger | null
      The meter reading of the cost message, in Wh (an OCPP 1.6 register).
    • timestampstring | null
    • messagesarray of any | null
  • next_actionobject | nullRequired
    Stripe: the hosted checkout to complete before charging starts.
  • start_operationobject | nullRequired
    Child attributes
    • idstringRequired
    • statusstringRequired
  • last_errorstring | nullRequired
  • targetTargetRecordRequired
    Child attributes
    • idstringRequired
      global, project_url, domain:<id> or custom_url.
    • kindenumRequired
      One of global, project_url, domain, custom_url
    • tenant_idinteger | nullRequired
      The project whose address was used (null for global).
    • urlstring | nullRequired
      The address used, without credentials; a custom URL's identity is masked.
    • hoststring | nullRequired
    • resolved_ipstring | nullRequired
      The address the connection was pinned to.
    • portinteger | nullRequired
    • station_idinteger | nullRequired
      project_url and domain: the bench's station in the project (p<project>-ivora-bench).
    • identitystring | nullRequired
      The OCPP identity used, masked for custom URLs.
    • passwordstring | nullRequired
      Always masked (••••••••) when one was supplied; null otherwise.
    • statusenum | nullRequired
      connecting until the charger connected at the target; failed with error; resetting while the charger is factory reset after the lease; restored once it is back on its default.
      One of default, connecting, connected, failed, resetting, restored
    • errorstring | nullRequired
      Why the connection failed: tcp, tls, http <status> or target_timeout.
    • connected_atstring | nullRequired
    • warningstring | null
      A custom ws:// URL: the identity and password travel unencrypted.
  • created_atstringRequired
  • started_atstring | nullRequired
  • ended_atstring | nullRequired
POST /v1/sessions
curl --fail-with-body -X POST "https://api.ivoracharge.com/v1/sessions" \
  -H "Authorization: Bearer $IVORA_API_KEY" \
  -H "Idempotency-Key: order-2026-09-30-0001" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 201
{
  "id": "id_0123456789abcdef",
  "workspace_id": "workspace_0123456789abcdef",
  "status": "preparing",
  "provider": "simulator",
  "payment_mode": "test",
  "charger": {
    "id": "id_0123456789abcdef",
    "tenant_id": 1042,
    "station_id": 1,
    "connector_id": 1,
    "evse": 1,
    "state": {}
  },
  "lease": {
    "status": "active",
    "idle_expires_at": "2026-09-30T17:00:00Z",
    "expires_at": "2026-09-30T17:00:00Z",
    "released_at": "2026-09-30T17:00:00Z",
    "release_reason": "string"
  },
  "bill_id": "bill_0123456789abcdef",
  "payment_id": "payment_0123456789abcdef",
  "transaction_id": 1,
  "transaction_active": false,
  "energy_wh": 7500,
  "energy_kwh": "string",
  "power_w": 1,
  "metered_at": "2026-09-30T17:00:00Z",
  "estimated_minor": 1250,
  "total_minor": 1250,
  "rate_minor": "string",
  "hold_minor": 1250,
  "refunded_minor": 1250,
  "currency": "USD",
  "billing_version": "energy-v1",
  "running_cost": {
    "displayed": false,
    "status": "string",
    "cost": "string",
    "cost_minor": 1250,
    "cost_decimals": 1,
    "meter_wh": 7500,
    "timestamp": "string",
    "messages": [
      null
    ]
  },
  "next_action": {},
  "start_operation": {
    "id": "id_0123456789abcdef",
    "status": "string"
  },
  "last_error": "string",
  "target": {
    "id": "id_0123456789abcdef",
    "kind": "global",
    "tenant_id": 1042,
    "url": "https://app.example.com/ivora/webhooks",
    "host": "string",
    "resolved_ip": "string",
    "port": 1,
    "station_id": 1,
    "identity": "string",
    "password": "string",
    "status": "default",
    "error": "string",
    "connected_at": "2026-09-30T17:00:00Z",
    "warning": "string"
  },
  "created_at": "2026-09-30T17:00:00Z",
  "started_at": "2026-09-30T17:00:00Z",
  "ended_at": "2026-09-30T17:00:00Z"
}
Try it is not available here yetRequests from this page are off until the production API at https://api.ivoracharge.com is public. Use the code samples from your application server; Ivora grants production access. Keys are created in Developer tools.