PHP Sample:
$hash=hash('sha512', $token.$email.$username.$ref );
Note: The above example shows how to generate the hash in PHP, the dots are not part of the string but for concatenation
$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
OK => Successful FAIL => Not Successful PENDING => Transaction not processed 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
username: user123, hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe, category: tv
{
"response": "OK",
"result": [
{
"product_id": "BPD-NGCA-AQA",
"name": "DSTV",
"hasProductList": true,
"hasValidation": false,
"openRange": false
},
{
"product_id": "BPD-NGCA-AQC",
"name": "GOTV",
"hasProductList": true,
"hasValidation": false,
"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
username: user123,
hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
category: tv,
product: BPD-NGCA-AQA
number: 4122773388
SAMPLE REQUEST 2
username: user123,
hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
category: tv,
product: BPD-NGCA-AQA
SAMPLE RESPONSE 1
{
"first_name":"A A",
"last_name":"GEORGE",
"status":"Active",
"primary_product_id":"BPD-DSTV-971",
"primary_product_name":"DStv Padi ",
"primary_product_price":"1850.00",
"primary_product_currency":"NGN",
"plans":[
{
"plan_id":"BPD-DSTV-921",
"name":"Premium",
"price":"18400",
"currency":"NGN"
},
{
"plan_id":"BPD-DSTV-931",
"name":"Compact Plus",
"price":"12400",
"currency":"NGN"
},
{
"plan_id":"BPD-DSTV-941",
"name":"Compact ",
"price":"7900",
"currency":"NGN"
},
{
"plan_id":"BPD-DSTV-951",
"name":"Confam",
"price":"4615",
"currency":"NGN"
},
{
"plan_id":"BPD-DSTV-961",
"name":"Yanga",
"price":"2565",
"currency":"NGN"
},
{
"plan_id":"BPD-DSTV-971",
"name":"Padi",
"price":"1850",
"currency":"NGN"
}
]
}
SAMPLE RESPONSE 2
{
"response": "B005",
"message": "Product has no plan in this category"
}
username: user123,
hash: 6a7ba624db21e84c6cb58e9e7f0055c8316bc2c2e3ac1d35e8c3fe,
category: tv,
product: BPD-NGCA-AQA,
validate: 41320018196
{
"response": "OK",
"result": {
"name": "ARON A VICTOR",
"number": "41320018196"
}
}
username: user123, hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db, ref: myRef, category: tv, product: BPD-NGCA-AQA, plan: ACSSE36, number: 41320018196
username: user123, hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db, ref: myRef, category: tv, product: BPD-NGCA-AWA, amount: 1000, number: 20020018196
username: user123, hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db, ref: myRef, category: electricity, product: BPE-NGCABIA-OR, amount: 1000, number: 0100040261, prepaid: 1
username: user123, hash: 21e84c6cb58e9e7f0055c8316bc2c2e4ac1d35e8c3fe6a7ba624db, ref: myRef, category: waec, product: BPM-NGCA-ASA, plan: 700
{
"response": "OK",
"transaction_id": "5a3388ac22a",
"discounted_amount": "1980",
"message": "Payment was successful"
}
{
"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"
}
{
"response": "OK",
"transaction_id": "5a3388ac22b",
"discounted_amount": "700",
"message": "Payment was successful",
"pins":[
{
"serialNumber":"WRN192775404",
"pin":"740525808961",
"expiresOn":null
}
]
}
{
"response": "B007",
"message": "Insufficient Balance"
}