Prerequisites
The following are required to successfully integrate to this service:
- The Merchant must be registered with PDSL Kenya.
- The Merchant will be provided with the following details by PDSL
- client - The user name unique to each merchant
- Password - The merchant’s password
- Connectivity
The API is accessible via the internet.
The request is made via HTTP POST to https://api.dibon.co.ke
API Request
Parameter |
Description |
Example |
api_key |
This should match the api key that you have generated for your Dibon account here
|
2_aa67677e8bf1d4c8fe886a38c03a860 |
client_id |
This should match the id of your account; found on your dashboard |
2 |
command_id |
Pass this as power_tokens |
power_tokens |
client_name |
Should be similar to the one provided by PDSL after account creation |
dibon |
meter_number |
Also known as meter number is an 11 digit serial number used to identify your meter |
12345678901 |
amount |
Refers to how much you wish to spend on the purchase of token |
400 |
API Response
Parameter |
Description |
Example |
status_code |
Transaction Response code |
200 |
description |
Response description |
Success. Request Scheduled Successfully |
request_id |
The unique referrence number as assigned by dpay |
Dibon20180307054639H4adfKDJDKQ7H |
meter_number |
Meter number to be assigned tokens |
12345678901 |
Amount |
Sum of money to send |
400 |
API Result
Parameter |
Description |
Example |
request_id |
The unique reference number as assigned by the Dibon API |
Dibon_2_HR8584JDJD |
token_number |
Represent the token number sent by service provider |
28360992855980632554 |
total_units |
Units awarded by service provider |
27.2 |
result_code |
Transaction result code |
200 |
result_desc |
Result code description |
The service request is processed successfully |
API Request
{
"api_key":"2_aa67677e8bf1d4c8fe886a38c03a86020180302111157",
"client_id":"2",
"command_id":"power_tokens",
"client_name":"dibon",
"meter_number":"12345678901",
"amount":"400"
}
API Response
{
"status_code":"200",
"description":"Service processing successful",
"request_id":"Dibon_HR8584JDJD",
"meter_number":"12345678901",
"amount":"400"
}
API Result
{
"request_id":"Dibon_2_HR8584JDJD",
"token_number":"28360992855980632554",
"total_units":"27.2",
"result_code":"200",
"result_desc":"The service request is processed successfully."
}