Switch running cost messages for a station on or off
On by default for every station; this stores an explicit choice that always wins over the default and persists until changed. When enabled, Ivora sends each bill started through this API its running cost while it charges (energy × the bill's rate, as finalization rounds it, at most every interval_seconds and only when it changed) and, on OCPP 1.6, its final cost once after it ends. Sessions without an Ivora bill get no message. Returns at once; the sweep sends. The charger must support the California Pricing extension (OCPP 1.6 CustomDisplayCostAndPrice) or CostUpdated; an OCPP 1.6 charger that rejects it reads charger_rejected and gets nothing until it reboots, and any write here clears that so the next session tries again. Replays with the same Idempotency-Key return the original result.
Path parameters
- tenant_idintegerRequired
- station_idintegerRequired
Headers
- idempotency-keystringRequired
Request body
- enabledbooleanRequiredSend the running and final cost of this station's bills to the charger screen (California CTEP). On by default; an explicit choice always wins over the default.
- interval_secondsintegerLeast time between two running cost messages of one session; a message goes out only when energy or cost changed.Default
60· Minimum 15 · Maximum 900
Returns · 200
- tenant_idintegerRequired
- station_idintegerRequired
- enabledbooleanRequiredWhether this station's bills get running cost messages: the explicit choice, else this environment's default (on; capabilities running_cost.default).
- interval_secondsintegerRequired
- sourceenumRequireddefault: no explicit choice, enabled follows the environment's default. manual: set by PUT (updated_by, updated_at) and kept until changed.One of
default,manual - updated_bystring | nullRequiredWho wrote the explicit choice (user: or key:); null for the default.
- supportenumRequiredocpp16_costmsg: OCA California Pricing DataTransfer (org.openchargealliance.costmsg RunningCost and FinalCost). ocpp2_cost_updated: CostUpdated during the session. ocpp2_deferred: OCPP 2.x cost messages are switched off in this environment while the charging core sends its own. charger_rejected: the OCPP 1.6 charger answered RunningCost with UnknownVendorId, UnknownMessageId or Rejected (see rejection); nothing is sent until it reboots or the setting is written. not_booted: the charger has not reported its protocol yet.One of
ocpp16_costmsg,ocpp2_cost_updated,ocpp2_deferred,charger_rejected,not_booted,protocol_unsupported - rejectionobject | nullRequiredThe charger's refusal while support is charger_rejected, else null.
Child attributes
- statusenumRequiredThe charger's DataTransfer.conf status.One of
UnknownVendorId,UnknownMessageId,Rejected - atstringRequiredWhen the charging core received the refusal.
- updated_atstring | nullRequiredWhen the explicit choice was last changed; null for the default.
- sessionsarray of RunningCostSession | nullRequiredThe 20 most recent priced sessions on this station, newest first; null without billing:read.
Child attributes
- bill_idstringRequired
- transaction_idinteger | nullRequiredCore transaction the bill matched.
- protocolstring | nullRequired
- stateenumRequiredrunning: running cost messages are being sent. final_pending: the session ended and its final cost is being sent (OCPP 1.6). final_sent: the charging core accepted the final cost message. final_rejected: the charger refused the final cost (last_error final_cost_rejected; some chargers refuse it once the transaction has stopped); the station and its later sessions are unaffected. final_by_core: OCPP 2.x carries the final cost in the core's TransactionEvent response. deferred: OCPP 2.x CostUpdated is switched off in this environment. expired: the final cost could not be sent within an hour of the end. failed: the bill could not be priced or matched; last_error has the code.One of
running,final_pending,final_sent,final_rejected,final_by_core,deferred,expired,failed - currencystringRequired
- cost_minorinteger | nullRequiredLatest running cost in minor units: energy × the bill's rate, as bill finalization rounds it.
- energy_whinteger | nullRequiredSession energy in Wh at cost_minor.
- sent_cost_minorinteger | nullRequiredRunning cost in minor units the core last accepted.
- sent_atstring | nullRequired
- sendsintegerRequiredRunning cost messages the core accepted for this session.
- final_minorinteger | nullRequiredFinal cost in minor units: the final bill's total, or the same calculation from the ended transaction.
- final_sent_atstring | nullRequired
- last_errorstring | nullRequiredError code of the last failed or withheld send, for example dispatch_unconfirmed, station_offline, charger_rejected or final_cost_rejected.
- updated_atstringRequired
curl --fail-with-body -X PUT "https://api.ivoracharge.com/v1/tenants/1042/stations/1/running-cost" \
-H "Authorization: Bearer $IVORA_API_KEY" \
-H "Idempotency-Key: order-2026-09-30-0001" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'{
"tenant_id": 1042,
"station_id": 1,
"enabled": false,
"interval_seconds": 1,
"source": "default",
"updated_by": "string",
"support": "ocpp16_costmsg",
"rejection": {
"status": "UnknownVendorId",
"at": "string"
},
"updated_at": "2026-09-30T17:00:00Z",
"sessions": [
{
"bill_id": "bill_0123456789abcdef",
"transaction_id": 1,
"protocol": "string",
"state": "running",
"currency": "usd",
"cost_minor": 1250,
"energy_wh": 7500,
"sent_cost_minor": 1250,
"sent_at": "2026-09-30T17:00:00Z",
"sends": 1,
"final_minor": 1250,
"final_sent_at": "2026-09-30T17:00:00Z",
"last_error": "string",
"updated_at": "2026-09-30T17:00:00Z"
}
]
}https://api.ivoracharge.com is public. Use the code samples from your application server; Ivora grants production access. Keys are created in Developer tools.