Please wait...

Airtel Money


This module is used for integrating Mobile Money with Merchants systems to enable real time verification of payments to Merchants done via Mobile Money. The Merchant Query is a web service that allows merchants to query the Mobile Money database to verify payments made to them.

Prerequisites

In order for Merchant to use this service the following need to be in place.

  1. The Merchants must be registered in Mobile Money.
  2. The Merchant must be registered to use this service.
  3. The Merchant will be provided with the following details
    1. User name
    2. Password
    3. The Merchant Query Web service url
  4. The merchant need to develop a web service client to consume this web service.
Integration

The API request is made via HTTP POST to

https://api.dibon.co.ke
All parameters below are compulsory. The parameters are:

Generic 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 airtel_c2b_query airtel_c2b_query
business_shortcode The organization shortcode 213484
time_from The query start time YYYYMMDDHH24MISS e.g. 20170605160700
time_to The query end time YYYYMMDDHH24MISS e.g. 20170606160700

Generic API Response
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
time_from Query start time 20170605160700
time_to Query end time 20170605160700

Generic API Result

Note that in order to ensure that you do not miss any transaction notifications the instant they come onto our api, register a callback url that we will invoke whenever we receive a notification for your service.

This is done on your Dibon Account Airtel Money 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.

Parameter Description Example
request_id The unique reference number as assigned by the Dibon API Dibon_2_HR8584JDJD
transaction_time The date and time stamp of the transaction. 2017-05-18 18:23:23
message A delimited string of the transaction details. The beginning of a record is marked with a “[“and the end of a record is marked with a “]”. The records are separated by a comma “,”. The fields in the record are separated by the pound sign. The order of the fields is [ReferenceId£MSISDN£Amount£Charges£Reference Field£TimeStamp£First Name£Last Name] [5111110233857£254736283045£1000£25£212541£20120605152412£KEN£NAI], [5111110233858£254736283045£2500£25£257812£20170605152613£KEN£NAI]
amount The total transacted amount for the transactions found 4000
result_code Transaction result Code 0
result_desc A message describing the request Status The service request is processed successfully.


Sample Request
                            {
                              "api_key":"2_aa67677e8bf1d4c8fe886a38c03a86020180302111157",
                              "client_id":"2",
                              "command_id":"airtel_c2b_query",
                              "business_shortcode":"213484",
                              "time_from":"20170605160700",
                              "time_to":"20170605160700"
                            }

                            


Sample Response
                            {
                              "status_code":200,
                              "description":"Success. Request Scheduled Successfully", 
                              "request_id":"Dibon20180307054639H4adfKDJDKQ7H",
                              "time_from":"20170605160700",
                              "time_to":"20170605160700"
                            }  
                          


Sample Result
                              {
                                "request_id":"Dibon_2_HR8584JDJD",
                                "transaction_time":"2017-05-18 18:23:23",
                                "message":"[5111110233857£254736283045£1000£25£212541£20120605152412£KEN£NAI],[5111110233858£254736283045£2500£25£257812£20170605152613£KEN£NAI]",
                                "amount":"4000",
                                "result_code":"0",
                                "result_desc":"The service request is processed successfully."
                              }