Aller au contenu

Premiers pas

Test mode

Run through charging, payments and faults without hardware and without real money.

Cette page n'est pas encore disponible dans ta langue. Tu vois la version anglaise.

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:

ActionEffect
plugPlug in a car. vehicle_need_wh sets how much energy the car takes until it is full.
unplugUnplug the cable. A running session ends with the reason unplugged.
set_powerChange the charging power, in watts with power_w.
offline, onlineDisconnect or reconnect the charging station.
error, clear_errorTrigger 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.

Une erreur ? Écris à developer@ladehase.com.