Please wait...
This service leverages on the powerful retention of the mobile Operator. STK Push allowes Mobile Operators to reach their users through the Push Technology.
STK Push provides customers a chance to purchase items online. Customers select the items they want to pay for and pay with STK Push at the checkout point. The total cost for the items purchased online is deducted from the customers M-PESA account. The customer only needs to key in their mobile number and they will receive an STK Push notification on their mobile phone to validate the transaction using their M-PESA PIN.
To use service, you will need to provide us with the a Paybill number or Till number being paid to.
The above is registered on your Dibon Account STK Push section.
IntegrationThis documentation is intended to guide third party application developers interact with the Dibon Payments platform in an easy way using HTTP Post and JSON.
The API request is made via HTTP POST to
https://api.dibon.co.ke
All parameters below are compulsory. The parameters are:
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 mpesa_c2b_stk | mpesa_c2b_stk |
business_shortcode | The Paybill number being paid to and should be registered on the dashboard | 123456 |
phone_number | The subscriber's phone number (subscriber making the payment) in E.164 format | 0712345678 |
amount | Amount to be settled | 200 |
account_name | a unique id passed by the third party system | DE45GK45 |
Parameter | Description | Example |
---|---|---|
status_code | Transaction Response code | 200 |
descritpion | Response description | Success. Request Scheduled Successfully |
request_id | The unique referrence number as assigned by dpay | Dibon20180307054639H4adfKDJDKQ7H |
phone_number | MSISDN | 254721553678 |
amount | The amount to send | 10 |
business_shortcode | The paybill number | 213484 |
The response from the Dibon API will be a JSON object which the client application can process.
Please note that in order to ensure that you do not miss any transaction notifications the instant they come onto our api, you will need to register a call back url that we will invoke whenever we receive a notification for your service transaction. This is done on your Dibon Account STK Push Call Back Section.
Every time a transaction status changes, we will forward you the following information as POST variables as outlined below as a JSON object.
The following POST parameters that will be passed will be as follows
Parameter | Description | Example |
---|---|---|
request_id | The unique reference number as assigned by the Dibon API | Dibon_2_HR8584JDJD |
third_party_trans_id | The reference number as assigned by the mobile money provider | HR8584JDJD |
account | The Paybill number being paid to | 888555 |
account_name | The account number as passed by API call | DE45GK45 |
transaction_time | The date and time stamp of the transaction. | 2017-05-18 18:23:23 |
phone_number | The subscriber's phone number (subscriber making the payment) in E.164 format | 254721553678 |
amount | The transaction amount | 4000 |
result_code | Transaction result code | 0 |
result_desc | Result code description | The service request is processed successfully |
All payment notifications are logged and securely stored for easy access and interrogation through your C2B Payments Record.
{ "api_key":"2_aa67677e8bf1d4c8fe886a38c03a86020180302111157", "client_id":"2", "command_id":"mpesa_c2b_stk", "phone_number":"0721553678", "amount":"4", "business_shortcode":"213484", "account_name":"DE45GK45" }
{ "status_code":200, "description":"Success. Request Scheduled Successfully", "request_id":"Dibon20180307054639H4adfKDJDKQ7H", "phone_number":"254721553678", "amount":"10", "business_shortcode":"213484" }
{ "request_id":"Dibon_2_HR8584JDJD", "third_party_trans_id":"HR8584JDJD", "account":"888555", "account_name":"DE45GK45", "transaction_time":"2017-05-18 18:23:23", "phone_number":"254721553678", "amount":"4000", "result_code":"0", "result_desc":"The service request is processed successfully." }