Electricity Recharge
This endpoint allows users to recharge electricity (prepaid or postpaid) by specifying provider details, meter number, amount, and meter type.
Endpoint
POST https://backendapi.sayswitchgroup.com/api/v1/electricity/recharge
cURL Request Example
curl -X POST https://backendapi.sayswitchgroup.com/api/v1/electricity/recharge \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-d '{
"provider": "IKEDC",
"number": "1111111111111",
"type": "prepaid",
"amount": 1000,
"reference": "2022051105275457530"
}'Sample Response
{
"success": true,
"code": "00000",
"message": "SUCCESSFUL",
"data": {
"orderNo": "2026111318502144124979",
"reference": "merchant-electricity-order-10001",
"status": "delivered",
"errorMsg": "TRANSACTION SUCCESSFUL",
"amount": 1000,
"discount": 0,
"fee": 100,
"totalDebited": 1100,
"purchased_code": "1234-5678-9012-3456",
"units": "20.5"
}
}Response Field
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the API call was successful |
| code | string | Status code (00000 means success) |
| message | string | Summary message (e.g. “SUCCESSFUL”) |
| data.orderNo | string | Internal order number assigned by the server |
| data.reference | string | Unique transaction reference provided by the client |
| data.status | string | Current status of the transaction (e.g., “delivered”) |
| data.errorMsg | string | Additional info about the transaction (e.g., success reason) |
| data.amount | number | Electricity value requested. |
| data.discount | number | Discount granted to the merchant. |
| data.fee | number | Bill-payment fee charged to the merchant. |
| data.totalDebited | number | Authoritative amount removed from the NGN wallet: amount + fee - discount. |
| data.purchased_code | string | Token code (for prepaid recharges) |
| data.units | string | Quantity of electricity units bought |
A pending purchase returns HTTP 202 with status: "pending". Do not submit it again; query the original reference using Status and reconciliation.