Bill Payment Api

Version 1

For TV, Internet & Electricity payment

This API allows you to pay your bills from your wallet account.

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



Use sha512 encryption algorithm to generate a hash by combining your Api Token, Account Email Address, Account Username and Your Transaction Reference.
PHP Sample:
$hash=hash('sha512', $token.$email.$username.$ref );
$Token is your Api Token
$Ref is an ID/Message generated by you for record tracking purposes (recommended). Note: if you use a reference, ensure you also pass "ref" as a post parameter for every request
To check account balance:
https://www.estoresms.com/smsapi.php?username=user123&password=pass123&balance=true&

where Account Username is user123 and account password is pass123

Note: Your username and password must be url encoded


RESPONSE CODES
OK => Successful
FAIL => Not Successful
B001 => Authentication Failed
B002 => Operation not allowed on account
B003 => API not enabled for this account
B004 => Invalid request
B005 => Product has no plan in this category
B006 => Validation failed
B007 => Insufficient Balance
B008 => Invalid Amount
B009 => Operation Failed


Step 1. GET PRODUCT LIST

Url: https://estoresms.com/bill_payment_processing/v/1/
Method: POST
Response Format: JSON

Available category include tv, internet, electricity

SAMPLE REQUEST 1

   username: user123,
   hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
   category: tv

  

SAMPLE REQUEST 2

   username: user123,
   ref: myRef,
   hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db,
   category: tv

  

SAMPLE RESPONSE
{
    "response": "OK",
    "result": [
        {
            "product_id": "BPD-NGCA-AQA",
            "name": "DSTV",
            "hasProductList": true,
            "hasValidation": true,
            "openRange": false
        },
        {
            "product_id": "BPD-NGCA-AQC",
            "name": "GOTV",
            "hasProductList": true,
            "hasValidation": true,
            "openRange": false
        },
        {
            "product_id": "BPD-NGCA-AWA",
            "name": "StarTimes",
            "hasProductList": false,
            "hasValidation": true,
            "openRange": true,
            "min_denomination": 1000,
            "max_denomination": 50000,
            "step": 1
        }
    ]
}
openRange: Indicates the available product list has no fixed amount and price, hence you can supply any amount within the minimum and maximum limit, step is the allowed interval
product_id: This is the product ID
hasProductList: The product has a fixed list of plan with amount, that can be fetched in step 2
hasValidation: You can validate the identity of the customer making payment, that can be done in step 3
Hint: If product does not have validation and product list, you can proceed to the final step (step 4)

Step 2. GET PRODUCT PLANS

Url: https://estoresms.com/bill_payment_processing/v/1/
Method: POST
Response Format: JSON

Note: Product ID must be gotten from step 1


SAMPLE REQUEST
   username: user123,
   hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
   category: tv,
   product:  BPD-NGCA-AQA


SAMPLE RESPONSE 1
{
    "response": "OK",
    "result": [
        {
            "plan_id": "ACSSE36",
            "name": "DStv Access",
            "price": 2000
        },
        {
            "plan_id": "COFAME36",
            "name": "DStv Family",
            "price": 4000
        },
        {
            "plan_id": "COMPE36",
            "name": "DStv Compact",
            "price": 6800
        },
        {
            "plan_id": "COMPLE36",
            "name": "DStv Compact Plus",
            "price": 10650
        }
    ]
}

SAMPLE RESPONSE 2
{
    "response": "B005",
    "message": "Product has no plan in this category"
}


Step 3. Customer Validation

Url: https://estoresms.com/bill_payment_processing/v/1/
Method: POST
Response Format: JSON

SAMPLE REQUEST
username: user123,
hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
category: tv,
product:  BPD-NGCA-AQA,
validate: 41320018196
                

SAMPLE RESPONSE
{
    "response": "OK",
    "result": {
        "name": "ARON A VICTOR",
        "number": "41320018196"
    }
}

In this case the customer is attempting to purchase a dstv plan, validate field holds the SmartCard Number

Step 4. MAKE A PURCHASE

Url: https://estoresms.com/bill_payment_processing/v/1/
Method: POST
Response Format: JSON

SAMPLE REQUEST 1
username: user123,
hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db,
ref: myRef,
category: tv,
product:  BPD-NGCA-AQA,
plan: ACSSE36,
number: 41320018196

 

SAMPLE REQUEST 2 (Example for startimes subscription)
username: user123,
hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db,
ref: myRef,
category: tv,
product:  BPD-NGCA-AWA,
amount: 1000,
number: 20020018196

 

SAMPLE REQUEST 3 (Example for electricity subscription)
username: user123,
hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db,
ref: myRef,
category: electricity,
product:  BPE-NGCABIA-OR,
amount: 1000,
number: 0100040261,
prepaid: 1

 

SAMPLE RESPONSE 1
{
    "response": "OK",
    "transaction_id": "5a3388ac22a",
    "discounted_amount": "1980",
    "message": "Payment was successful"
}

SAMPLE RESPONSE 2
{
    "response": "OK",
    "transaction_id": "5a3388ac22a",
    "discounted_amount": "980",
    "message": "Payment was successful",
    "pin_code": "3022399443",
    "pin_message": "Operator Message : 2.2KWh at N21.65 per KWh; Account : 0100040261; Receipt No : 4952724; Transaction ID :20171208120600~1013417"
}

SAMPLE RESPONSE 3
{
    "response": "B007",
    "message": "Insufficient Balance"
}