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

Please wait...

Airtel Money USSD-PUSH


This module is used for integrating Mobile Money with Merchants systems to enable real time payments to Merchants using USSD-PUSH. USSD-PUSH is a web service that allows merchants to initiate a transaction that is terminated on the recipient's phone for approval of payment.

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. Client ID
    2. API Key
    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 am_ussd_push am_ussd_push
business_shortcode The organization shortcode 21348
amount Amount to be paid 70000
description The message intended for the recipient MSISDN Do you want to pay 70000 to Dibon Company Ltd

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 Dibon API Dibon20180307054639H4adfKDJDKQ7H
phone_number Recipient MSISDN 254789970265
amount Amount to be paid by Recipient 70000

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 Dibon20180307054639H4adfKDJDKQ7H
transaction_time The date and time stamp of the transaction. 2017-05-18 18:23:23
result_desc A string with transaction details Trans ID 24507040773 Confirmed. Ksh 150 paid to Dibon Push on 28/10/20 at 05:20 PM. New balance Ksh 9,561. Send Money for FREE across the Airtel Network, Dial *222# to get started!
amount The amount for that particular transaction 70000
phone_number Phone number that has made the payment 254789970265


Sample Request
                            {
                              "api_key":"2_aa67677e8bf1d4c8fe886a38c03a86020180302111157",
                              "client_id":"2",
                              "command_id":"am_ussd_push",
                              "business_shortcode":"21348",
                              "phone_number":"254789970265",
                              "amount":"70000", 
                              "description":"Do you want to pay 70000 to Dibon Company Ltd"
                            }

                            


Sample Response
                            {
                              "status_code": 200,
                              "description": "Success. Request Scheduled Successfully",
                              "request_id": "Dibon202011041210483957kKZCWRorc",
                              "phone_number": "254789970265",
                              "amount": "70000",
                              "business_shortcode": "21348"
                          


Sample Result
                          {
                            "amount": "70000",
                            "result_desc": "Trans ID 24507040773 Confirmed. Ksh 150 paid to Dibon Push on 28/10/20 at 05:20 PM. New balance Ksh 9,561. Send Money for FREE  across the Airtel Network, Dial *222# to get started!",
                            "transaction_time": "2020-10-28 17:20:50.0",
                            "phone_number": "254789970265",
                            "request_id": "Dibon202011041210483957kKZCWRorc"
                          }