Bills PaymentsElectricityElectricity Recharge

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

FieldTypeDescription
successbooleanIndicates if the API call was successful
codestringStatus code (00000 means success)
messagestringSummary message (e.g. “SUCCESSFUL”)
data.orderNostringInternal order number assigned by the server
data.referencestringUnique transaction reference provided by the client
data.statusstringCurrent status of the transaction (e.g., “delivered”)
data.errorMsgstringAdditional info about the transaction (e.g., success reason)
data.amountnumberElectricity value requested.
data.discountnumberDiscount granted to the merchant.
data.feenumberBill-payment fee charged to the merchant.
data.totalDebitednumberAuthoritative amount removed from the NGN wallet: amount + fee - discount.
data.purchased_codestringToken code (for prepaid recharges)
data.unitsstringQuantity 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.