Getting started
Test mode
Run through charging, payments and faults without hardware and without real money.
With a test key lh_test_… you work in a fully separate test environment. Charging stations are simulated and payments use a test payment. Ideal for trying things out, for automated tests and for AI agents you want to let practise safely first.
Create test devices
curl -X POST https://api.ladehase.com/v1/integrations/test \
-H "Authorization: Bearer lh_test_…"
Ladehase creates a test integration with simulated charge points. The request can be repeated, existing test devices are kept.
Simulate a car
Control a test device with POST /v1/devices/{id}/simulate. Allowed actions:
| Action | Effect |
|---|---|
plug | Plug in a car. vehicle_need_wh sets how much energy the car takes until it is full. |
unplug | Unplug the cable. A running session ends with the reason unplugged. |
set_power | Change the charging power, in watts with power_w. |
offline, online | Disconnect or reconnect the charging station. |
error, clear_error | Trigger or clear a fault. |
curl -X POST https://api.ladehase.com/v1/devices/dev_…/simulate \
-H "Authorization: Bearer lh_test_…" \
-H "Content-Type: application/json" \
-d '{ "action": "plug", "vehicle_need_wh": 20000 }'
Test payments
When you scan the QR code of a test charge point, the payment page opens a test payment. There you choose whether the payment succeeds, fails or is cancelled. This lets you check every path without moving money.
Webhooks work in test mode exactly as in live mode. Every event carries livemode: false.
Go live
As soon as you have connected a real charging station and an account at zahls.ch or Freika, use a live key lh_live_…. Nothing changes in your code except the key.
Found a mistake? Write to developer@ladehase.com.