Eko Postpaid :: API

Eko Electricity Distribution Postpaid

User Validation:

A customer must be validated before processing subscription. This will return the account status and associated information such as the businessUnit, customerReference, accountNumber and customerName. Request can be made using the smart card number.

Command: https://mobilenig.com/API/bills/user_check?username=****&api_key=****&service=****&number=****
//where username: Use your MobileNig Username, api_key: Your api_key, service: EKO_POSTPAID, number: customerReference.

You can use this CustomerReference 101512454501 for testing on EKO_POSTPAID
EKO_POSTPAID JSON return format:
{"details":{"businessUnit":"OJO","meterNumber":"101512454501","accountNumber":"101512454501","customerName":"SUNDAY AGAGARAGA"}}

In most cases the initial response will be an error stating that the transaction is still pending (Error Code: ERR108). In order to resolve the issue it is required to call the Query method. The transaction should be resolved within 2 minutes.


Parameter_Name Type Description
username String Your MobileNig username
api_key String The api_key generated on MobileNig
customerReference Number Meter number
amount number Amount of electricity bills e.g 2000
trans_id Number Unique transaction id e.g 71836382871981


//Replace **** with your username, api_key...

For Api test use https://mobilenig.com/API/bills/eko_postpaid_test?username=****&api_key=****&customerReference=101512454501&amount=1000&trans_id=71836382871981
Api Example: https://mobilenig.com/API/bills/eko_postpaid?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5&customerReference=101512454501&amount=1000&trans_id=71836382871981
//where username is PAUL and api_key is 64125agshaii168sdhd4b6bdb5, customerReference is 101512454501, amount is 1000, and trans_id is 71836382871981.

If successful: A response will be desplayed in JSON format e.g {"trans_id":"7183638281271981","details":{"service":"EKO_POSTPAID","package":"#1000 Eko Electricity Distribution Postpaid","customerReference":"101512454501","amount":"1000","status":"SUCCESSFUL","balance":"4500"}}
Else, one of the responses below will be displayed in this format {"code": "ERR101", "description": "Invalid username or api_key"}


Code Description
ERR101 Invalid username or api_key
ERR102 Api service is currently unavailable
ERR103 Requested service is currently unavailable
ERR104 User Suspended
ERR105 Transaction id already exist, kindly generate a unique id
ERR106 Insufficient Balance
ERR107 Transaction Unsuccessful
ERR108 Transaction is pending, kindly query to get transaction status
ERR202 Incomplete Parameters
ERR206 Duplicate transaction, same order details had been made few minutes ago


//Replace **** with your username, api_key...
Api Example: https://mobilenig.com/API/bills/query?username=PAUL&api_key=64125agshaii168sdhd4b6bdb5trans_id=71836382871981
//where username is PAUL and api_key is 64125agshaii168sdhd4b6bdb5, trans_id is 71836382871981.

If successful: A response will be desplayed in JSON format e.g {"trans_id":"7183638281271981","details":{"service":"EKO_POSTPAID","package":"#1000 Eko Electricity Distribution Postpaid","customerReference":"101512454501","amount":"1000","status":"SUCCESSFUL"}}
Else, response will be displayed in this format {"code": "ERR204", "description": "Could't find transaction on MobileNig"}