Api documentation



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 API

Please use the following details for authentication

Username: Your username

Password: Your Password

GET KENSPAY BALANCE
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
email M string Your email address

eg: https://kenspay.com/api/airtime?username=kenspay&password=kenspay
&serviceID=mtn&amount=100&phone=08111111111
[email protected]

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,9mobile-pin,glo-pin,

variation_code
NAMECODE AMOUNT
MTN PINmtn-pin-100100
MTN PINmtn-pin-200200
MTN PINmtn-pin-400400
MTN PINmtn-pin-700700
MTN PINmtn-pin-15001500
Airtel Pinairtel-pin-100100
Airtel Pinairtel-pin-200200
Airtel Pinairtel-pin-500500
Airtel Pinairtel-pin-10001000
9Mobile Pin9mobile-pin-100100
9Mobile Pin9mobile-pin-200200
9Mobile Pin9mobile-pin-500500
9Mobile Pin9mobile-pin-10001000
GLO Pinglo-pin-100100
Glo PINglo-pin-100200
Glo PINglo-pin-500500
Glo PINglo-pin-10001000

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
email 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
[email protected]

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
NAMECODE AMOUNT
Airtime-pinairtime-pin-to-100 100
Airtime-pinairtime-pin-to-200200
Airtime-pinairtime-pin-to-400400
Airtime-pinairtime-pin-to-500500
Airtime-pinairtime-pin-to-10001000
Airtime-pinmtn-10mb-15001500
Airtime-transferairtime-transfer-to-100 100
Airtime-transferairtime-transfer-to-200200
Airtime-transferairtime-transfer-to-400400
Airtime-transferairtime-transfer-to-500500
Airtime-transferairtime-transfer-to-10001000
Airtime-transferairtime-transfer-to-30003000
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
email 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
[email protected]

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:
http://www.kenspay.com/sms_api.php?username=megzy&password=major&
sender=OneCrib&dest=2349093302368&msg=Testing the API

Multiple recipients:
http://www.kenspay.com/sms_api.php?username=megzy&password=major&
sender=OneCrib&dest=2349093302368,08098987676,2348098789876
&msg=Testing the API

NOTE: The SENDER, DEST and MSG must be URL ENCODED for the API to work properly. It is advisable to pass 25 destinations at a time for multiple rceipients.

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:
http://www.kenspay.com/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
NAMECODE AMOUNT
30MB - 24hrsmtn-10mb-100100
100MB -24hrsmtn-50mb-200200
750MB-7Daysmtn-150mb-500500
1.5GB-30Days mtn-100mb-10001000
3.5GB-3Daysmtn-500mb-20002000
MTN Data Bundle mtn-100hr-5000 5000
MTN Data Bundle mtn-3gb-6000 6000
MTN Data Bundle mtn-8gb-80008000
MTN Data Bundle mtn-300hr-1300013000
Airtel Data Bundle 50MB + 10% Bonus - 1Dayairt-10099
Airtel Data Bundle 200MB + 10% Bonus - 3Daysairt-200199
Airtel Data Bundle 350MB + 10% Bonus - 7 Daysairt-300299
Airtel Data Bundle 750MB + 10% Bonus - 14 Daysairt-500499
Airtel Data Bundle 1.5GB + 10% Bonus for Social Media - 30 Daysairt-1000999
Airtel Data Bundle 3.5GB + 10% Bonus for Social Media - 30 Daysairt-20001999
Airtel Data Bundle 5GB + 10% Bonus for Social Media - 30 Daysairt-25002499
Airtel Data Bundle 7GB + 10% Bonus for Social Media - 30 Daysairt-35003499
Airtel Data Bundle 9GB + 10% Bonus for Social Media - 30 Daysairt-40003999
Airtel Data Bundle 10GB + 10% Bonus for 30 Daysairt-50004999
9mobile Data Bundleeti-100100
9mobile Data Bundleeti-500500
9mobile Data Bundleeti-10001000
9mobile Data Bundleeti-20002000
9mobile Data Bundleeti-80008000
9mobile Data Bundleeti-1000010000
9mobile Data Bundleeti-1500015000
9mobile Data Bundleeti-18000 18000
Glo Data 35MB - 1 dayglo100100
Glo Data 100MB - 5 dayglo200200
Glo Data 800MB - 10 dayglo500500
Glo Data 1.6GB - 30 dayglo10001000
Glo Data 3.75GB - 30 dayglo20002000
Glo Data 5GB - 30 dayglo25002500
Glo Data 6GB - 30 dayglo30003000
Glo Data 8GB - 30 dayglo40004000
Glo Data 12GB - 30 dayglo50005000
Glo Data 16GB - 30 dayglo80008000
Glo Data 23GB - 30 dayglo1000010000
Glo Data 30GB - 30 dayglo1500015000
Glo Data 45GB - 30 dayglo1800018000
1GB MTN SME DATA1000500
2GB MTN SME DATA20001000
5GB MTN SME DATA50002400
Smile Flexi Daily356500

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
email 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
[email protected]

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
NAMECODE AMOUNT
Dstv Extra View Access extraview-access2255
Dstv Confamdstv-confam 4615
Dstv Premium dstv316200
Dstv Padidstv-padi1850
Dstv French Plus Addonfrenchplus-addon6520
Dstv Asia Only dstv65540
Dstv Compact Plusdstv710925
DStv Padi Extrapadi-extra4105
Dstv Premium French dstv922750
Dstv Premium Asia dstv1018150
Gotv Litegotv-lite410
Gotv Jinjagotv-jinja1640
Gotv Jolligotv-jolli2460
Novanova900
Basic basic1300
Classic classic1900
Nova - 1 Weeknova-weekly300
Gotv Maxgotv-max3280
Smart smart1900
Supersuper3800
DStv Compact dstv796975

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
email 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
[email protected]

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
NAMECODE AMOUNT
WAEC Registration PINwaec-registraion14500
WAEC Result Checker PINwaecdirect900

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
email 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
[email protected]

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"}
INSURANCE (HTTP) END POINT API

Coming soon

BANK TRANSFER (HTTP) END POINT API

Coming soon