Bank Payments

This API enables you to pay make payment to your bank of choice. Head over to the Bank Code List to see if your bank is supported and record its respective bankcode.

Creating a Bank Payment 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/m2b/v1

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 the payment is being performed on behalf of. Use the 254 format. Eg. 254722000000

bankcode*

String

The bankcode of the receipient Bank. Record the appropriate bankcode from the Bank Code List sub-page.

accountNumber*

String

The account Number of the paybill receiving the funds.

const axios = require('axios');

const data = {
  amount: 10,
  bankcode: "001",
  accountNumber: "353353",
  username: "username",
  phone: "254722000000"
};

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

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

This will require the Bank Payments product to be added to your shortCode. Consult with [email protected] to confirm status. If you`re using demo clients credentials, the payment will not go through. However if youre testing as a demo client, the payment will go through as long as it is a valid paybill shortcode.

Last updated