KensPay Developer Documentation API(HTTP)
Welcome to the Kenspay Developer Documentation.
Kenspay allows you to integrate All Our payment services available on the Kenspay platform on your application. You'll find comprehensive guides and documentation to help you start working with Kenspay as quick as possible, as well as support if you get stuck.To use our API you must be a registered user on Kenspay technology.
Authentication
Make sure to use your Username and Password as Basic Authentication to access the APIPlease use the following details for authentication
Username: Your username
Password: Your Password
PAYMENT GATEWAY API
AIRTIME API
DATA API
TV SUBSCRIPTION API
ELECTRICITY PAYMENT API
BULKSMS API
EDUCATION API
INSURANCE API
BANK TRANSFER API
CHECK BALANCE (HTTP) END POINT API
Get Kenspay Wallet Balance
Using a GET or POST method,
your Kenspay wallet balance can be retrieved using the end point below:Live URL: https://kenspay.com/api/balance
Sandbox URL: http://sandbox.kenspay.com/api/balance
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
sk | M | string | your secret key, you can find that on your account on kenspay by clicking settings then generate your sk and pk |
username | M | string | your kenspay username |
password | M | number | your kenspay password |
eg: https://kenspay.com/api/balance?username=kenspay&password=kenspay
EXPECTED SUCCESSFUL RESPONSE
{"balance":"1081"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}GATE WAY (HTTP) END POINT API
Coming soon
AIRTIME VTU (HTTP) END POINT API
PURCHASE AIRTIME VTU
Using a POST method,
AIRTIME can be Purchase using the end point below:Live URL: https://kenspay.com/api/airtime
Sandbox URL: http://sandbox.kenspay.com/api/airtime
serviceID: mtn,airtel,etisalat,glo,
for successful test transaction use this phone number: 08111111111 while on failed transaction use other number
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: mtn |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
amount | M | number | the amount you want to topup eg 100 |
phone | M | number | The phone number of the recipient of this service | M | string | Your email address |
eg: https://kenspay.com/api/airtime?username=kenspay&password=kenspay
&serviceID=mtn&amount=100&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"code":"s0c","message":"Transaction Successful"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}
AIRTIME pin (HTTP) END POINT API
PURCHASE AIRTIME pin
Using a POST method,
AIRTIME pin can be Purchase using the end point below:Live URL: https://kenspay.com/api/airtime-pin
Sandbox URL: http://sandbox.kenspay.com/api/airtime-pin
serviceID: mtn-pin,airtel-pin,etisalat-pin,glo-pin,all-network,
variation_code
NAME | CODE | AMOUNT |
---|---|---|
MTN PIN | mtn-pin-100 | 100 |
MTN PIN | mtn-pin-200 | 200 |
MTN PIN | mtn-pin-400 | 400 |
MTN PIN | mtn-pin-700 | 700 |
MTN PIN | mtn-pin-1500 | 1500 |
Airtel Pin | airtel-pin-100 | 100 |
Airtel Pin | airtel-pin-200 | 200 |
Airtel Pin | airtel-pin-500 | 500 |
Airtel Pin | airtel-pin-1000 | 1000 |
9Mobile Pin | 9mobile-pin-100 | 100 |
9Mobile Pin | 9mobile-pin-200 | 200 |
9Mobile Pin | 9mobile-pin-500 | 500 |
9Mobile Pin | 9mobile-pin-1000 | 1000 |
GLO Pin | glo-pin-100 | 100 |
Glo PIN | glo-pin-100 | 200 |
Glo PIN | glo-pin-500 | 500 |
Glo PIN | glo-pin-1000 | 1000 |
mtn | mtn-pin-50 | 50 |
for successful test transaction use this phone number: 08111111111 while on failed transaction use other number
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: mtn-pin |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
variation_code | M | string | the variation_code replace the amount field, use the variation code above to topup eg mtn-pin-100 for N100 topup |
quantity | M | number | the quantity of airtime you want to generate, eg 100 in to two place, which is ( quantity:2) |
phone | M | number | The phone number of the recipient of this service | M | string | Your email address |
eg: https://kenspay.com/api/airtime-pin?username=kenspay&password=kenspay
&serviceID=mtn&variation_code=mtn-pin-100&quantity=2&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"response":"OK","ref":"myRef","transaction_id":"api_5dd3e401ec409","amount":2,"amount_charged":"1.96","pin":[{"serial":"4133211","pin":"5928763207493","USSD":"*258*5928763207493#"},
{"serial":"4133212","pin":"1358547048503","USSD":"*258*1358547048503#"}]}
EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}
AIRTIME CONVERTER (HTTP) END POINT API
CONVERT AIRTIME TO MONEY
Using a POST method,
AIRTIME can be CONVERT TO MONEY using the end point below:Live URL: https://kenspay.com/api/convert
serviceID: airtime-pin-converter,airtime-transfer-converter,
variation_code
NAME | CODE | AMOUNT |
---|---|---|
Airtime-pin | airtime-pin-to-100 | 100 |
Airtime-pin | airtime-pin-to-200 | 200 |
Airtime-pin | airtime-pin-to-400 | 400 |
Airtime-pin | airtime-pin-to-500 | 500 |
Airtime-pin | airtime-pin-to-1000 | 1000 |
Airtime-pin | mtn-10mb-1500 | 1500 |
Airtime-transfer | airtime-transfer-to-100 | 100 |
Airtime-transfer | airtime-transfer-to-200 | 200 |
Airtime-transfer | airtime-transfer-to-400 | 400 |
Airtime-transfer | airtime-transfer-to-500 | 500 |
Airtime-transfer | airtime-transfer-to-1000 | 1000 |
Airtime-transfer | airtime-transfer-to-3000 | 3000 |
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: mtn-pin-converter |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
variation_code | M | string | the variation_code replace the amount field, use the variation code above to topup eg airtime-pin-to-100 for N100 |
network | M | string | the network of airtime you want to send, eg MTN |
phone | M/O | number | The phone number you use in making the transfer | M | string | Your email address |
eg: https://kenspay.com/api/convert?username=kenspay&password=kenspay
&serviceID=mtn&variation_code=airtime-pin-to-100&network=mtn&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"code":"s0c","message":"pending"} {"code":"s0c","message":"credited"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}
BULK SMS (HTTP) END POINT API
Parameters:
username: Your username on Kenspay technology.
password: Your password on Kenspay technology.
sender: This is the sender id that will appear on the recipient's phone. Alphanumeric = 11 Characters, Numeric = 18 characters.
dest: The destination numbers where the message will be sent to. Separated with a comma(,) for multiple recipients.
msg: The message to be sent. 160 characters per message.
Examples:
Single recipient:
https://www.kenspay.com.ng/sms_api.php?username=megzy&password=major&
sender=OneCrib&dest=2349093302368&msg=Testing the API
Multiple recipients:
https://www.kenspay.com.ng/sms_api.php?username=megzy&password=major&
sender=OneCrib&dest=2349093302368,08098987676,2348098789876
&msg=Testing the API
Return values:
146 = Successful
140 = Usuccessful
141 = Insufficient credit
Credit balance report:
Parameters:
meg_report: The value should be set to "balance" to specify that you are quering your account balance.
username: Your username on Kenspay technology.
password: Your password on Kenspay technology.
Examples:
https://www.kenspay.com.ng/sms_api.php?meg_report=balance&username=megzy&password=major
DATA (HTTP) END POINT API
PURCHASE DATA
Using a POST method,
DATA can be Purchase using the end point below:Live URL: https://kenspay.com/api/data
Sandbox URL: http://sandbox.kenspay.com/api/data
serviceID: mtn-data,airtel-data,etisalat-data,glo-data,mtn-sme,airtel-sme,smile-direct,
variation_code
NAME | CODE | AMOUNT |
---|---|---|
100MB - 24hrs | mtn-10mb-100 | 100 |
200MB -2DAYS | mtn-50mb-200 | 200 |
6GB-7Days | mtn-20hrs-1500 | 1500 |
1.5GB-30Days | mtn-100mb-1000 | 1000 |
4.5GB-30Days | mtn-500mb-2000 | 2000 |
15GB - 30 days | mtn-100hr-5000 | 5000 |
20GB - 30 days | mtn-3gb-6000 | 6000 |
6GB - 30 Days | mtn-3gb-2500 | 2500 |
3GB - 30 Days | mtn-3gb-1500 | 1500 |
Airtel Data Bundle 50MB + 10% Bonus - 1Day | airt-100 | 99 |
Airtel Data Bundle 200MB + 10% Bonus - 3Days | airt-200 | 199 |
Airtel Data Bundle 350MB + 10% Bonus - 7 Days | airt-300 | 299 |
Airtel Data Bundle 750MB + 10% Bonus - 14 Days | airt-500 | 499 |
Airtel Data Bundle 1.5GB + 10% Bonus for Social Media - 30 Days | airt-1000 | 999 |
Airtel Data Bundle 3.5GB + 10% Bonus for Social Media - 30 Days | airt-2000 | 1999 |
Airtel Data Bundle 5GB + 10% Bonus for Social Media - 30 Days | airt-2500 | 2499 |
Airtel Data Bundle 7GB + 10% Bonus for Social Media - 30 Days | airt-3500 | 3499 |
Airtel Data Bundle 9GB + 10% Bonus for Social Media - 30 Days | airt-4000 | 3999 |
Airtel Data Bundle 10GB + 10% Bonus for 30 Days | airt-5000 | 4999 |
9mobile Data Bundle | eti-100 | 100 |
9mobile Data Bundle | eti-500 | 500 |
9mobile Data Bundle | eti-1000 | 1000 |
9mobile Data Bundle | eti-2000 | 2000 |
9mobile Data Bundle | eti-8000 | 8000 |
9mobile Data Bundle | eti-10000 | 10000 |
9mobile Data Bundle | eti-15000 | 15000 |
9mobile Data Bundle | eti-18000 | 18000 |
Glo Data 35MB - 1 day | glo100 | 100 |
Glo Data 100MB - 5 day | glo200 | 200 |
Glo Data 800MB - 10 day | glo500 | 500 |
Glo Data 1.6GB - 30 day | glo1000 | 1000 |
Glo Data 3.75GB - 30 day | glo2000 | 2000 |
Glo Data 5GB - 30 day | glo2500 | 2500 |
Glo Data 6GB - 30 day | glo3000 | 3000 |
Glo Data 8GB - 30 day | glo4000 | 4000 |
Glo Data 12GB - 30 day | glo5000 | 5000 |
Glo Data 16GB - 30 day | glo8000 | 8000 |
Glo Data 23GB - 30 day | glo10000 | 10000 |
Glo Data 30GB - 30 day | glo15000 | 15000 |
Glo Data 45GB - 30 day | glo18000 | 18000 |
1GB MTN SME DATA | 1000 | 500 |
2GB MTN SME DATA | 2000 | 1000 |
5GB MTN SME DATA | 5000 | 2400 |
Smile Flexi Daily | 356 | 500 |
for successful test transaction use this phone number: 08111111111 while on failed transaction use other number
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: mtn-data |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
variation_code | M | string | the variation_code replace the amount field, use the variation code above to topup eg mtn-10mb-100 for N100 topup |
phone | M | number | The phone number of the recipient of this service | M | string | Your email address |
eg: https://kenspay.com/api/data?username=kenspay&password=kenspay
&serviceID=mtn-data&variation_code=mtn-10mb-100&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"code":"s0c","message":"Transaction Successful"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}
TV (HTTP) END POINT API
PURCHASE TV
Using a POST method,
TV can be Purchase using the end point below:Live URL: https://kenspay.com/api/tv
Sandbox URL: http://sandbox.kenspay.com/api/tv
serviceID: dstv,gotv,startimes,
variation_code
NAME | CODE | AMOUNT |
---|---|---|
Dstv Extra View Access | extraview-access | 2500 |
Dstv Confam | dstv-confam | 4615 |
Dstv Premium | dstv3 | 18400 |
Dstv Padi | dstv-padi | 1850 |
Dstv French Plus Addon | frenchplus-addon | 8100 |
Dstv Asia Only | dstv6 | 5540 |
Dstv Compact Plus | dstv7 | 12400 |
DStv Padi Extra | padi-extra | 4105 |
Dstv Premium French | dstv9 | 25550 |
Dstv Premium Asia | dstv10 | 20500 |
Gtv Smallie - Monthly | gotv-smallie | 800 |
Gotv Jinja | gotv-jinja | 1640 |
Gotv Jolli | gotv-jolli | 2460 |
Nova | nova | 900 |
Basic | basic | 1700 |
Classic | classic | 2500 |
Nova - 1 Week | nova-weekly | 300 |
Gotv Max | gotv-max | 3600 |
Smart | smart | 2200 |
Super | super | 4200 |
DStv Compact | dstv79 | 7900 |
DStv Yanga | dstv-yanga | 2565 |
for successful test transaction use this phone number: 08111111111
billersCode: 1212121212 while on failed transaction use other number
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: gotv |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
billersCode | M | string | the billersCode is the decoder iuc or smart card number, |
variation_code | M | string | the variation_code replace the amount field, use the variation code above to subscrib eg gotv-max subscription |
phone | M | number | The phone number of the recipient of this service | M | string | Your email address |
eg: https://kenspay.com/api/tv?username=kenspay&password=kenspay
&serviceID=gotv&billersCode=1212121212&variation_code=gotv-max&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"code":"s0c","message":"Transaction Successful"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"11","message":"decoder number is invalid or empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}
ELECTRICITY (HTTP) END POINT API
Coming soon
EDUCATION (HTTP) END POINT API
PURCHASE EDUCATION SCRATCH CARD
Using a POST method,
SCRATCH CARD can be Purchase using the end point below:Live URL: https://kenspay.com/api/education
Sandbox URL: http://sandbox.kenspay.com/api/education
serviceID: waec,neco,
variation_code
NAME | CODE | AMOUNT |
---|---|---|
WAEC Registration PIN (WASSCE) Not Available | waec-registraion | 14450 |
WAEC Result Checker PIN | waecdirect | 1800 |
for successful test transaction use this phone number: 08111111111 while on failed transaction use other number
FIELDS | Mandatory/Optional | TYPE | DESCRIPTION |
---|---|---|---|
username | M | string | your kenspay username |
password | M | string | your kenspay password |
serviceID | M | string | Service ID as specified by Kenspay. eg: waec-direct |
transaction_id | M | string | This is a unique reference with which you can use to identify and query the status of a given transaction after the transaction has been executed. |
variation_code | M | string | the variation_code replace the amount field, use the variation code above to buy scratch card eg waecdirect for N900 |
phone | M | number | The phone number of the recipient of this service | M | string | email address to send the card to. |
eg: https://kenspay.com/api/education?username=kenspay&password=kenspay
&serviceID=waec-direct&variation_code=waecdirect&phone=08111111111
&transaction_id=12345789&email=person@gmail.com
EXPECTED SUCCESSFUL RESPONSE
{"code":"s0c","message":"Transaction Successful"}EXPECTED FAILED RESPONSE
{"code":"01","message":"invalid credentials"}{"code":"08","message":"transaction id is empty"}
{"code":"09","message":"transaction id already exit"}
{"code":"03","message":"invalid service id"}
{"code":"04","message":"phone number is empty"}
{"code":"10","message":"phone number must be exact 11 characters e.g 08126216200"}
{"code":"05","message":"Amount field is empty"}
{"code":"06","message":"You can not carry out transaction below N100 and above N20.000"}
{"code":"07","message":"email address field is empty"}
{"code":"00","message":"Transaction Failed"}'
{"code":"02","message":"low wallet"}