Airtime API, SMS API, Payment API (pesalink, airtel and Mpesa b2c, b2b, stk-push)

Please wait...

PesaLink to Phone Documentation


This API will enable you to transfer funds from your own Co-operative Bank account to phone number(s) linked to IPSL participating banks

Every time a transaction status changes, we will forward you the transaction notifications for you to process.

Getting started

Getting started is easy. All you will need is a Co-operative Bank account configured in your Dibon's account.

Integration

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 developer account here 2_aa67677e8bf1d4c8fe886a38c03a860
client_id This should match your organization id. 2
command_id Pass this as pesa_link_to_phone pesa_link_to_phone
phone_number Phone number to which the money will be transferred 0712345678
account_number Sender account number created under Co-operative Bank 361234567
amount The amount being transacted 200
narration A string describing the transaction Send 200.00 to 0712345678

API Response

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 B2C Call Back Section.

Every time a transaction status changes, we will forward you the following information as POST variables as illustrated in the JSON object below.

            {"Destinations":[{"ResponseCode":"0",
                      "Amount":"10",
                      "ResponseDescription":"Success",
                      "TransactionCurrency":"KES",
                      "PhoneNumber":"0712345678"}],
        "MessageReference":"Dibon202011041210483957kKZCWRorc",
        "Source":{"ResponseCode":"0",
                "Amount":"10",
                "ResponseDescription":"Success",
                "TransactionCurrency":"KES",
                "AccountNumber":"36001873111"}}
          

Sample API Request
          {
            "api_key":"2_aa67677e8bf1d4c8fe886a38c03a860",
            "client_id":"2",
            "command_id":"pesa_link_to_phone",
            "account_number":"36001873111",
            "amount":"10",
            "phone_number":"0712345678",
            "narration":"Send 200.00 to 0712345678"
          }
          


Sample Callback URL Script
        {"Destinations":[{"ResponseCode":"0",
                      "Amount":"10",
                      "ResponseDescription":"Success",
                      "TransactionCurrency":"KES",
                      "PhoneNumber":"0712345678"}],
        "MessageReference":"Dibon202011041210483957kKZCWRorc",
        "Source":{"ResponseCode":"0",
                "Amount":"10",
                "ResponseDescription":"Success",
                "TransactionCurrency":"KES",
                "AccountNumber":"36001873111"}}