B2C Disbursements

B2C API is an API used to make payments from a Business to Customers (Pay Outs), also known as Bulk Disbursements. B2C API is used in several scenarios by businesses that require to either make Salary

Creating a B2C Request.

For this to be successful, ensure that you have a minimum of 10 KSH in your account. Also ensure that the amount is equal or greater than 10 Kenyan Shillings.

Endpoint for the API request.

POST https://api.rotsi.co.ke/payments/b2c/v1

Make an B2C Disbursement to your customers, suppliers Mpesa or Non-Mpesa Registered phone number.

Request Body

Name
Type
Description

username*

string

The username of the account, as per the Rotsi Dashboard.

amount*

Integer

The amount of the transaction

phone*

string

The phone number to receive the money. USe the 254 format. Eg. 254722000000

const axios = require('axios');

const data = {
  amount: 1,
  phone: "254722000000",
  username: "username"
};

const config = {
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'secret_key'
  }
};

axios.post('https://api.rotsi.co.ke/payments/b2c/v1', data, config)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });
{
    "status": "Success",
    "Service": "RotsiB2C",
    "RotsiAPITransactionId": B2C719hcbjh2,
    "CustomerMessage": "The request is being processed"
}

Last updated