MobileMila API Documentation


Introduction


MobileMila is a Virtual Airtime and Data recharge business connected to all the major mobile networks in Nigeria.
This document describes the RESTful web services exposed on the mobilemila.com platform that enables business partners to sell different products and track their account. We have a group of restful API that created a consistent JSON response. It consist of a constant base URL and various endpoint for various purposes of calling our Server. Our API is very easy to integrate and also have a high level of security on information sent via API call. Parameters are sent using the POST method. The responses from this API are all in JSON format and contain information about transactions and additional information for record purpose and referencing.
Each API call has three (3) major part that are treated by the server, they are;
  • Server Addresses
  • Endpoints
  • Contents


Server Addresses:

The base URL for MobileMila Seamless vending are:
Base URL: http://mobilemila.com/vendor/api/

Endpoints:

The Endpoints on the API are as follows;
  • balance
  • buydata
  • airtime
  • vendpin
  • cablepay
  • decodercheck
  • devicecheck
  • verifymeter
  • electricity
  • verifyorder
  • products

Contents:

These are the parameters to pass which include: username, password and product code (id).


Check Balance And Plan Level


Balance endpoint display the balance left on your account at mobilemila.com. Low balance will affect trading as the value in the balance must not be at any time lower than the purchase to be made.
Balance request are sent using GET method.

Endpoint: balance?username=07030237966&password=123456
Parameters: your username and password on mobilemila.com
Response: {"bal":"18758.70","plan":"User","status":"1","msg":"Account verified"}


Get Products Name, Id And Prices


The products endpoint display all the products available for you to vend on the mobilemila.com API Platform.
This helps to get the products name, id and prices for each products.
Products request can be sent using GET method.

Endpoint: products?username=07030237966&password=123456
Parameters: your username and password on mobilemila.com
Response:



Airtime Topup


To vend airtime, please follow the instruction below: Airtime Endpoint, Parameters and Response:
Endpoint: airtime?username=xxx&password=yyy&network=mtn&amount=50&phone=07030237966
User Parameters: your username and password on mobilemila.com
Network Parameters: mtn, glo, airtel and 9mobile
Other Parameters: amount = amount to buy, phone = phone number that will receive the airtime.
Response: {"msg":"Transaction successful. 07030237966 has been recharged with MTN N50 airtime topup. Kindly check your account balance","status":"1","orderid":"733455838158"}

Please note the following:
  • Minimum airtime vending is N50.
  • Airtime value : We do not accept floating or decimal values, strictly numbers e.g 1000 not 1000.00....
  • Please verify the status of your order. Some client might send airtime to a wrong network hoping it will deliver. In such cases, some Network provider reject the order while some will accept the value and won't process the transaction. Hence, you are guided to strictly indicate a warning in such regards to your clients


Verify Airtime Status:

Endpoint: verifyorder?orderid=733455838158
Parameters: orderid=733455838158
Response: "status":"1","msg":"MTN N50.00 to 2347030237966 sent successfully","txType":"airtime","response":"Completed"}



GSM Data Bundles


To buy GSM data bundles, please follow the instruction below:
Buydata Endpoint, Parameters and Response:

Endpoint: buydata?username=xxx&password=yyy&phone=07030237966&dataplan=mtn500sme
User Parameters: your username and password on mobilemila.com
Other Parameters: phone = phone number that will receive data.
Dataplan Parameters: dataplan = is the product id of the dataplan
Response: {"msg":"Order successful","status":"1","orderid":"823721723166263","datasize":"MTN 500MB/30days SME","network":"MTN"}

Please note the following:
Please note that the product id for each product is already discussed on Products Id page.
Kindly check to get the instruction on how to fetch product id for each dataplan

Verify Data Status:
Endpoint: verifyorder?orderid=823721723166263
Parameters: orderid=823721723166263
Response: "status":"1","msg":"MTN 500MB/30days SME to 2347030237966 sent successfully","txType":"data","response":"Completed"}



MTN SME DATA PIN Vending


SME DATAPIN is a new method of selling SME data offline for those who intend to be selling data without having internet access. You can generate a voucher of your choice and follow the process to get your mobile number recharged with the data volume you ordered for.


Available SME DataPINs are:
  • MTN DataPIN 500MB
  • MTN DataPIN 1.0GB
  • MTN DataPIN 2.0GB
  • MTN DataPIN 5.0GB


Vendpin Endpoint, Parameters and Response:
Endpoint: vendpin?username=???&password=???&qty=4&dataplan=mtndatapin500
User Parameters: your username and password on mobilemila.com
Other Parameters: phone = phone number that will receive data.
Dataplan Parameters: dataplan = is the product id of the dataplan
Response: {"msg":"Order successful","status":"1","orderid":"823721723166263","datasize":"MTN 500MB/30days SME","network":"MTN"}

Please note the following:
Please note that the product id for each product is already discussed on Products Id page.
Kindly check to get the instruction on how to fetch product id for each dataplan

Verify Data Status:
Endpoint: verifyorder?orderid=823721723166263
User Parameters: your username and password on mobilemila.com
Other Parameter: qty = quantity of the PIN to generate.
Dataplan Parameter: dataplan = is the product id of the dataplan
Response: {"msg":"Token Generated","status":"1","orderid":"420957242280507","batchNo":"66353411","qty":"(04)","pinreceiver":"07068829972","datapin":"4**F-***9-0500-MSME,**G7-F***-0500-MSME,D***-8***-0500-MSME,88**-0000-0500-MSME","product":"MTN DataPIN 500MB"}

Please note the following:
Please note that the product id for each product is already discussed on Products Id page.
Kindly check to get the instruction on how to fetch product id for each dataplan

Verify Datapin Status:
Verify with Transaction Id

Endpoint: verifyorder?orderid=823721723166263
Parameters: orderid=823721723166263

Verify with Data PIN

Endpoint: verifyorder?orderid=AFBA-EFAD-0500-MSME Parameters: orderid=AFBA-EFAD-0500-MSME

Completed Response: {"txType":"DataPIN","status":"1","datavolume":"MTN 500MB/30days SME","datapin":"2BE3-98C4-0500-MSME","msg":"Data sent to 07030237966","orderid":"5203870455469203","response":"Completed"}
Refund Response: {"txType":"DataPIN","status":"4","datapin":"AFBA-EFAD-0500-MSME","datavolume":"MTN 500MB/30days SME","msg":"Order Refunded","orderid":"1125694439169416","response":"Refunded"}


Broadband Internet Data Bundles


Smile Internet Endpoint, Parameters and Response:
Verify Smile Account Number

It is advisable to always verify the account before vending.It helps to determine if the account belongs to the owner that want to perform transaction and also eliminate crediting of wrong account by user.
Endpoint: devicecheck?username=xxx&password=yyy&account=1805005330&type=smile
User Parameters: your username and password on mobilemila.com
Other Parameter: account = smile account number to verify and type = the network provider
REQUEST RESPONSE: {"details":{"firstName":"Raheem","lastName":"Opeyemi","middleName":""}}

Purchase Smile Bundles

Firstly, ensure to get the product id of the SMILE Bundle you are intending to purchase using products endpoint on the Products Id page.
Endpoint: buydata?username=xxx&password=yyy&phone=1805005330&dataplan=smile1gbflexi1
User Parameters: your username and password on mobilemila.com
Other Parameter: phone = smile account number to receive data and dataplan = product id of the bundle to purchase
Response: {"msg":"Order successful","status":"1","orderid":"823721723166263","datasize":"Smile 1GB FlexiDaily (1 day) NGN 500","network":"SMILE"}



Cable Television Subscriptions


Available Cable television are:
  • DSTV
  • GOTV
  • STARTIMES

Verify CableTV IUC (Smartcard) Number

It is advisable to always verify the CableTV IUC (Smartcard) Number before vending.It helps to determine if the IUC (Smartcard) Number belongs to the owner that want to perform transaction and also eliminate crediting of wrong IUC (Smartcard) Number by user.
Endpoint: checkcable?username=xxx&password=yyy&iuc=2029159670&cable=gotv
User Parameters: your username and password on mobilemila.com
Other Parameter: iuc = IUC (Smartcard) number to verify and cable = gotv, dstv or startimes
REQUEST RESPONSE: {"details":{"accountStatus":"OPEN","firstName":"OGUNBOWALE","lastName":"RAH","customerType":"GOTVSUD","invoicePeriod":1,"dueDate":"2001-01-01T00:00:00+01:00","customerNumber":26651783}}

Purchase CableTV bouquet or packages

Firstly, ensure to get the product id of the CableTV bouquet or packages you are intending to purchase using products endpoint on the Products Id page.
Endpoint: cablepay?username=xxx&password=yyy&iuc=2029159670&productid=gotvplus
User Parameters: your username and password on mobilemila.com
Other Parameter: iuc = IUC (Smartcard) number to receive the subscription and productid = product id of the bouquet or package to purchase
Response: {"msg":"Order successful","status":"1","orderid":"641920148827","bq":"GOTv Plus NGN 1900","cableType":"GOTV"}

Verify CableTV subscription

Endpoint: verifyorder?orderid=641920148827
Parameters: orderid=641920148827
Response: {"txType":"cabletv","status":1,"msg":"GOTv Plus NGN 1900 subscribed to 2029159670","orderid":"641920148827","response":"Completed"}



Electricity Bills Payment


Available Electricity company are:
  • Abuja Electricity Distribution Company (AEDC)
  • Eko Electricity Distribution Company (EKEDC)
  • Enugu Electricity Distribution Company (EEDC)
  • Ibadan Electricity Distribution Company (IBEDC)
  • Ikeja Electricity Distribution Company (IKEDC)
  • Jos Electricity Distribution Company (JEDC)
  • Kaduna Electricity Distribution Company (KAEDC)
  • Kano Electricity Distribution Company (KEDC)
  • PORT HARCOURT Electricity Distribution Company (PHEDC)

Verify Meter Number
It is advisable to always verify the Electricity Meter Number before vending. It helps to determine if the Meter Number belongs to the owner that want to perform transaction and also eliminate crediting of wrong Meter Number by user.
Endpoint: checkmeter?username=xxx&password=yyy&meterno=371320*****&productid=ibedcprepd
User Parameters: your username and password on mobilemila.com
Other Parameter: meterno = meterno number to verify and productid = get this from the Products Id endpoint.
Response: {"details":{"customerId":"23480000000004|DUGB|1","name":"AJIBADE AJIBADE","responceCode":"0","status":"0"}}
Purchase Electricity Token
Before vending electricity of any disco, kindly get the product id for each disco
  • Abuja Prepaid - aedcprepd
  • Eko Prepaid - ekoprepd
  • Enugu Prepaid - eedcprepd
  • Ibadan Prepaid - ibedcprepd
  • Ikeja Prepaid - ikejaprepd
  • Jos Prepaid - jedcprepd
  • Kaduna Prepaid - kaedcprepd
  • Kano Prepaid - kedcprepd
  • Port Harcourt Prepaid - phedcprepd

Endpoint: electricity?username=xxx&password=yyy&meterno=371320*****&amount=100&productid=ibedcprepd
User Parameters: your username and password on mobilemila.com
Other Parameter: meterno = meterno number to receive the charge, amount = amount to buy and productid = product id of the electricity company
Response: {"msg":"Transaction successful","product":"IBEDC Prepaid","token":"3390 9368 8549 ********","token_amount":"100","orderid":"798705933226601","status":1}



Verify Order


It is good to verify the status of your order after every purchase and give the update to your client to let them know the status of their transactions.
Verify Order Status:
Endpoint: verifyorder?orderid=733455838158
Parameters: orderid=733455838158
Response: {"status":"1","msg":"MTN N50.00 to 2347030237966 sent successfully","txType":"airtime","response":"Completed"}

Please note the following:
  • Order id is recieved from response of every successful placed order.
  • The order id helps to know the status of the order after vending
  • This is applicable to every order received on our server



Support


If you have any questions, please contact us by calling 09059339693. or send details query to support email mymobilemila@gmail.com. We aim to answer all questions within 24 hours . In some cases the waiting time can be extended to 48 hours. We hope you found this document helpful. Thank you!