Direct Airtime Api


This API allows you to purchase airtime directly from your wallet account.
Not recommended for commercial use.

You are required to enable Airtime Api Token in settings page, save and then copy Airtime Api token generated.
Note: Do not share your Airtime Api Token



Use sha512 encryption algorithm to generate a hash from combining your Airtime Api Token, Account Email Address, Account Username and Your Transaction Reference.
$hash=hash('sha512', $token.$email.$username.$ref );
$Token is your Airtime Api Token
$Ref is an alphanumeric code generated by you for record purposes


RESPONSE CODES
 OK => Successful
 FAIL => Not Successful
 P000 => Incomplete Information
 P001 => Authentication failed
 P002 => Invalid Network selected
 P003 => Phone number is required
 P004 => Amount is required
 P005 => Amount is not numeric
 P006 => Minimum recharge allowed per transaction N50
 P007 => Invalid phone number
 P008 => Network selected for phone number is invalid
 P009 => Insufficient Balance
 P010 => API Token not enabled
 P011 => Process Failed
 P012 => Unable to complete request
 P013 => Maximum recharge allowed per transaction N50,000.


GET SUPPORTED NETWORKS
Url: http://estoresms.com/network_list
Method: GET
Parameters: None

SAMPLE RESPONSE
[
    {"id":"airtel","name":"Airtel Network"},
    {"id":"9mobile","name":"9mobile Network"},
    {"id":"mtn","name":"MTN Network"},
    {"id":"glo","name":"Glo Network"}
]


MAKE A TRANSACTION
Url: http://estoresms.com/network_processing
Method: POST
Request Format: JSON
Response Format: JSON


SAMPLE REQUEST
{
  "username":"user123",
  "ref":"MyRef001",
  "hash":"g521f5ba60d1fd56c0ee067bc838d4c6502b7921ae530c4d2",
  "credit":
    [
      {"network":"glo","phone":"08050000000","amount":"2000"},
      {"network":"mtn","phone":"08030000000","amount":"1000"}
    ]
}


SAMPLE RESPONSE 1
[
    {
    "ref_id":"MyRef001",
    "tnxID":"5a05906074a90",
    "phone":"08050000000",
    "amount":"2000",
    "amount_charged":1920,
    "response":"OK"
    },

    {
    "ref_id":"MyRef001",
    "tnxID":"5a05906074a91",
    "phone":"08030000000",
    "amount":"1000",
    "amount_charged":960,
    "response":"OK"
    }
]

SAMPLE RESPONSE 2
[
    {
    "response":"P009",
    "message":"Insufficient Balance"
    }
]

   

HTML Airtime Api


This API allows visitors on your website to purchase airtime directly from your eStore Account through the use of a web interface. After successful payment has been made, you will be credited with the amount payed and debited with the amount we charge for that airtime amount.

This Api might not be supported by all CMS websites.

To get started, copy and paste the following lines of code at a desired location of your website

<div id="estore_airtime_api"  value="user123"> </div>
<script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="//estoresms.com/scripts/type/js/files/estore_airtime_api.js"></script>

Step 1: Replace user123 in line 1 with your account username
Step 2: Copy and paste the whole of line 1 to the exact location where you want it displayed
Step 3: Copy line 2 and line 3 and paste to your desired location. We advise it should be placed close to the end of your webpage.


Note:
1. You may ignore line 2 if you have added jquery to your website already but ensure line 3 is placed below it.
2. Make sure you have enabled Airtime Api Token in your account settings.

All Done!


SAMPLE CODE

<html>
<head>
    <title>Name of my website</title>
</head>
<body>
    Welcome to my website. You can make airtime purchase directly from this page.
    <div id="estore_airtime_api"  value="user123"> </div>
    Thanks for visiting!

    <script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
    <script src="//estoresms.com/scripts/type/js/files/estore_airtime_api.js"></script>
  </body>
</html>


JOOMLA Airtime Module


This API allows visitors on your website to purchase airtime directly from your eStore Account through the use of a web interface.
After successful payment has been made, you will be credited with the amount payed and debited with the amount we charge for that airtime amount.

To get started,
Step 1: install our joomla module
Step 2: Navigate to module manager and add new module "eStore Airtime Web Api"
Step 3: Enter a title for the module and eStore Account Username
Step 4: Select a desirable position then save


Note:
1. You must enter your eStore Username in the Module manager page of your website.
2. Make sure you have enabled Airtime Api Token in your account.


All Done!