Finalize trusted usage for external capture

post/v1/tenants/{tenant_id}/charging-sessions/{session_id}/finalize
Requires an API key

Requires billing:write. Physical usage requires the completed transaction ID observed on the session; simulated sessions require energy_wh. The result is immutable USD cents. Capture it in your backend; Ivora does not call your processor.

Path parameters

  • tenant_idintegerRequired
  • session_idstringRequired

Headers

  • idempotency-keystringRequired

Request body

  • transaction_idinteger | null
    Greater than 0
  • energy_whinteger | null
    Simulation only. Physical usage is read from CSMS, never accepted from the caller.
    Minimum 0 · Maximum 50000

Returns · 200

  • idstringRequired
  • tenant_idintegerRequired
  • station_idintegerRequired
  • connector_idintegerRequired
  • sourceenumRequired
    One of csms, simulated
  • tariff_idintegerRequired
  • rate_minorstringRequired
  • hold_minorintegerRequired
  • currencystringRequired
  • charging_tokenstringRequired
  • statusenumRequired
    One of open, final
  • energy_kwhstring | nullRequired
  • energy_whinteger | null
    Integer Wh of the finalized usage.
  • total_minorinteger | nullRequired
  • transaction_idinteger | nullRequired
  • created_atstringRequired
  • finalized_atstring | nullRequired
  • settlement_ownerenum
    One of managed, external · Default "managed"
  • billing_versionstring
    Default "energy-v1"
  • usageobject | null
    Single bill reads only: live matched usage after start, a final snapshot once final.
    Child attributes
    • transaction_idinteger | nullRequired
      Physical transaction resource ID; null for simulated bills.
    • activebooleanRequired
    • energy_kwhstring | nullRequired
      Decimal kWh string for display.
    • energy_whinteger | nullRequired
      Integer Wh for arithmetic.
    • estimated_minorinteger | nullRequired
      Integer minor units. On final bills this equals total_minor.
    • started_atstring | nullRequired
    • ended_atstring | nullRequired
    • power_winteger | null
      Latest reported charging power in watts; 0 once the transaction ended; null when the charger reports none.
    • soc_percentinteger | null
      Latest reported vehicle state of charge, when the charger reports it.
    • metered_atstring | null
      Timestamp of the meter sample behind power_w/soc_percent.
  • start_operationobject | null
    Single bill reads only: the journaled start dispatch, if any.
    Child attributes
    • idstringRequired
    • tenant_idintegerRequired
    • statusenumRequired
      One of dispatching, succeeded, rejected, unknown
    • resultobject | nullRequired
    • created_atstringRequired
    • updated_atstringRequired
POST /v1/tenants/{tenant_id}/charging-sessions/{session_id}/finalize
curl --fail-with-body -X POST "https://api.ivoracharge.com/v1/tenants/1042/charging-sessions/session_0123456789abcdef/finalize" \
  -H "Authorization: Bearer $IVORA_API_KEY" \
  -H "Idempotency-Key: order-2026-09-30-0001" \
  -H "Content-Type: application/json" \
  -d '{}'
Response · 200
{
  "id": "id_0123456789abcdef",
  "tenant_id": 1042,
  "station_id": 1,
  "connector_id": 1,
  "source": "csms",
  "tariff_id": 42,
  "rate_minor": "string",
  "hold_minor": 1250,
  "currency": "USD",
  "charging_token": "string",
  "status": "open",
  "energy_kwh": "string",
  "energy_wh": 7500,
  "total_minor": 1250,
  "transaction_id": 1,
  "created_at": "2026-09-30T17:00:00Z",
  "finalized_at": "2026-09-30T17:00:00Z",
  "settlement_owner": "managed",
  "billing_version": "energy-v1",
  "usage": {
    "transaction_id": 1,
    "active": false,
    "energy_kwh": "string",
    "energy_wh": 7500,
    "estimated_minor": 1250,
    "started_at": "2026-09-30T17:00:00Z",
    "ended_at": "2026-09-30T17:00:00Z",
    "power_w": 1,
    "soc_percent": 1,
    "metered_at": "2026-09-30T17:00:00Z"
  },
  "start_operation": {
    "id": "id_0123456789abcdef",
    "tenant_id": 1042,
    "status": "dispatching",
    "result": {},
    "created_at": "2026-09-30T17:00:00Z",
    "updated_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.