Skip to main content
This takes about ten minutes. You need to be a manager of an approved, active fleet in the ChargeExpress fleet portal. Start with a sandbox key. The sandbox is a private copy of your fleet with fake drivers, simulated chargers and simulated payments, so nothing you do while building touches real people, chargers or money. When you’re ready, go live with a live key.

1. Create a sandbox API key

1

Open Developers → API keys

Sign in to the fleet portal, open Developers in the sidebar, then the API keys tab.
2

Create a key

Click Create key and choose Sandbox. Give it a name that says which system will use it (for example accounting-sync-dev), and pick its scopes. Read only grants fleet:read; Full access grants every scope. You can also set an expiry date.
3

Copy the key now

The full key, such as cxk_test_7Hq2…, is shown once. Store it in your secret manager. ChargeExpress keeps only a hash, so a lost key cannot be recovered; revoke it and create another.
API keys act with a fleet manager’s access to your fleet. Keep them on your servers. Never put a key in a mobile app, a browser, or a repository.

2. Make your first request

Retrieve your fleet. The key needs the fleet:read scope. With a sandbox key this returns your fleet’s sandbox copy, which is created on your first request.
A successful response looks like this:
Response
Every response, successful or not, has an X-Request-Id header such as req_m2k8q4w9z1x7c3v5b6n0p2r4. Log it; it’s the fastest way for support to find your request. If something goes wrong you’ll get an error object instead.

3. Register a webhook endpoint

Webhooks tell you when sessions finish, the wallet is funded, and more. Your endpoint must be a public https:// URL on port 443 or 8443. You can register it in the portal (Developers → Webhooks) or with the API, using a key with webhooks:write:
curl
The response includes the signing secret. Like the API key, it is returned only here (and from rotate_secret):
Response
Use ["*"] to subscribe to every event type, including ones added later. An endpoint registered with a sandbox key belongs to the sandbox: it receives only sandbox events (livemode: false).

4. Verify the signature

Every delivery is a POST with a JSON event and an X-ChargeExpress-Signature header. Verify it against the raw request body before you trust the payload. This Express handler uses the verifier from Verifying signatures:
server.js

5. Send a test event

Click Send test on the endpoint in the portal, or call the API:
curl
ChargeExpress sends a signed ping event to the endpoint straight away and tells you what your server answered. To try a real event shape, send {"type": "session.completed"} (or any other event type) as the body:
Response
Test events are never stored, so they don’t appear in /events and are never retried.

6. Run a session in the sandbox

Start a session on a simulated charger from Developers → Sandbox in the fleet portal, and watch session.started, session.stopped_by_limit and session.completed arrive at your endpoint within seconds. The Sandbox guide walks through it, including a simulated top-up.

Going live

When your integration works against the sandbox:
  1. Create a live key (cxk_live_…) in the production fleet portal under Developers → API keys → Create key → Live. Live keys are only offered there.
  2. Swap it into your secret store in place of the sandbox key, and change the base URL to https://partners.chargeexpressltd.com/api/public/v1. Live keys only work there, and sandbox keys only work on https://stage.partners.chargeexpressltd.com/api/public/v1.
  3. Register your webhook endpoints again with the live key, and store their new signing secrets. Sandbox endpoints never receive live events.
  4. If one server receives both sandbox and live events, branch on the event’s livemode.
From then on your calls act on your real fleet: drivers get login invites, you see their real charging sessions, and top-ups go through ExpressPay.

Next steps