Quickstart
Sell your first unit of electricity in the sandbox, in about five minutes.
Everything here runs against reserved test numbers with play money. Nothing reaches a real meter and nobody is charged.
1. Get a test key
On the API keys page, issue a key in test mode. Copy it when it appears. The secret is shown once and we cannot show it to you again.
Check it works, and confirm which mode you are in:
curl https://stagingapi.getelectric.ng/api/v2/reseller/me \
-H 'Authorization: Bearer <your-test-key>'{
"success": true,
"status": "success",
"code": 200,
"message": "OK",
"data": {
"reseller_id": 7,
"mode": "test",
"enabled": true,
"kyb_status": "APPROVED",
"max_concurrent_requests": 5,
"sandbox_balance": 500000
}
}If mode is live, stop. You are holding a live key, and the next call would
spend real money.
2. Verify a meter
11111111111 is the reserved meter that delivers. Verifying is not optional:
the access_code that comes back is required when you place the order.
curl https://stagingapi.getelectric.ng/api/v2/reseller/meters/verify \
-H 'Authorization: Bearer <your-test-key>' \
-H 'Content-Type: application/json' \
-d '{
"meter_number": "11111111111",
"disco_code": "IKEDC"
}'{
"success": true,
"status": "success",
"code": 200,
"message": "OK",
"data": {
"name": "Sandbox Customer",
"address": "1 Test Close, Sandbox",
"phone_number": "08000000000",
"meter_number": "11111111111",
"short_code": "IKEDC",
"meter_type": "PREPAID",
"access_code": "sbx_4f1c9a2b7e6d3085a1b4c7d2"
}
}Show the customer that name and address before you take their money. That is what verification is for.
3. Place the order
Pick your own reference. Use something you can find again in your own
records, because it is how you will ask us about this order later.
curl https://stagingapi.getelectric.ng/api/v2/reseller/orders \
-H 'Authorization: Bearer <your-test-key>' \
-H 'Content-Type: application/json' \
-d '{
"reference": "my-first-order-001",
"meter_number": "11111111111",
"disco_code": "IKEDC",
"amount": 5000,
"access_code": "sbx_4f1c9a2b7e6d3085a1b4c7d2"
}'{
"success": true,
"status": "success",
"code": 202,
"message": "Order accepted.",
"data": {
"reference": "my-first-order-001",
"mode": "test",
"service": "electricity",
"state": "delivered",
"settled": true,
"amount": 5000,
"token": "TEST-4821 9033 7715 2064",
"token_units": 71.4,
"transaction": "TESTSW-9A3F5C1E7B2D4068",
"placed_at": "2026-11-18T09:14:22Z"
}
}That token is what your customer types into their meter. In the sandbox it is made up, and the units come from a flat 70 naira per kWh.
Note
11111111111 delivers immediately, which is convenient and not realistic. A
live order usually comes back processing and settles seconds later. Build
for that, and use 44444444444 to see it: that meter stays processing for
15 seconds before it delivers.
4. Try the retry
Send the exact same request again, same reference and all.
{
"success": true,
"status": "success",
"code": 200,
"message": "This reference was already used. Returning the original order.",
"data": { "reference": "my-first-order-001", "state": "delivered" }
}No second order, no second charge. This is the behaviour to lean on whenever a request times out and you do not know whether it landed.
5. Ask about it later
curl https://stagingapi.getelectric.ng/api/v2/reseller/orders/my-first-order-001 \
-H 'Authorization: Bearer <your-test-key>'Where to go next
- Placing an order, including airtime, data and cable TV
- Webhooks, so you stop polling
- Sandbox for the other five reserved meters, including the ones that fail
- Going live