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

Please wait...

C2B Documentation


In this day and age, cash payments are continuously advancing with customers leaning more and more towards mobile money payments. The use cases where C2B (Consumer To Business) transactions can take place vary widely from utility bills to e-commerce. This method of instant payment is convenient to both the merchant and the customer.

Once you connect to us, with a PayBill or Till number, you will be able to receive C2B transaction notifications from the service provider. This will enable customers to make payments via the various mobile money transfer platforms available.

Getting started

Getting started is easy. All you will need is a Payment Product configuration in your Dibon's account. You can have as many products as you wish, and each will be linked to a payment provider (such as Safaricom's M-PESA) through one of their payment channels (such as a Paybill or Buy Goods number).

Integration

This 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 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 C2B 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.

API Response

The POST request will be sent to a URL provided on your account. The 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 or Till number being paid to 888555
account_name The account number as entered by the subscriber. (optional – only for Paybill payments) DE45GK45
transaction_time The date and time stamp of the transaction 2017-05-18 18:23:23
account_balance The Paybill, Buygoods account balance 3000
phone_number The subscriber's phone number (subscriber making the payment) in E.164 format +254903119111
customer_name The name of the subscriber who made the payment John Rambo
amount The transaction amount 4000

All payment notifications are also logged and securely stored for easy access and interrogation through your account dashboard.


Sample Callback URL Script
            {
              "request_id":"Dibon_2_HR8584JDJD",
              "third_party_trans_id":"HR8584JDJD",
              "account":"888555",
              "account_name":"DE45GK45",
              "transaction_time":"2017-05-18 18:23:23",
              "account_balance":"3000",
              "phone_number":"+254903119111",
              "customer_name":"John Rambo",
              "amount":"4000"
            }