Bank Payouts

How to send bank payments (PesaLink API) with IntaSend

Please go through the Send Money Pre-requisite to obtain the API Keys, Device ID and everything else you need to proceed.

Once setup we recommend using the SDKs provided by IntaSend to make it easy for you to sign and approve with less efforts. We have done the heavy lifting for you, so do not reinvent the wheel if the SDK of your stack is already available.

Bank Transaction Fields

When sending payment to a bank account, the following fields must be specified in your transaction items:

FieldDescription
nameBeneficiary bank account name
accountBeneficiary bank account
bank_codeBank code reference. See our list of bank code below. Used to identify the beneficiary bank.
amountAmount you intend to send in KES
narrativePurpose of payment

List of Bank Codes

You must specify a bank code in the transaction item when sending bank payments. To obtain the values of the bank codes that are available, send a GET request to the following resource:

GET https://payment.intasend.com/api/v1/send-money/bank-codes/ke/

Sample response from the above request

[
  {
    "bank_name": "KCB",
    "bank_code": "1"
  },
  {
    "bank_name": "Standard Charted Bank KE",
    "bank_code": "2"
  },
  {
    "bank_name": "Barclays Bank",
    "bank_code": "3"
  },
  {
    "bank_name": "CBA",
    "bank_code": "7"
  },
  {
    "bank_name": "Prime Bank",
    "bank_code": "10"
  },
  {
    "bank_name": "Cooperative Bank",
    "bank_code": "11"
  },
  {
    "bank_name": "National Bank",
    "bank_code": "12"
  },
  {
    "bank_name": "Citibank",
    "bank_code": "16"
  },
  {
    "bank_name": "Habib Bank AG Zurich",
    "bank_code": "17"
  },
  {
    "bank_name": "Middle East Bank",
    "bank_code": "18"
  },
  {
    "bank_name": "Bank of Africa",
    "bank_code": "19"
  },
  {
    "bank_name": "Consolidated Bank",
    "bank_code": "23"
  },
  {
    "bank_name": "Credit Bank Ltd",
    "bank_code": "25"
  },
  {
    "bank_name": "Stanbic Bank",
    "bank_code": "31"
  },
  {
    "bank_name": "ABC Bank",
    "bank_code": "35"
  },
  {
    "bank_name": "NIC Bank",
    "bank_code": "42"
  },
  {
    "bank_name": "Spire Bank",
    "bank_code": "49"
  },
  {
    "bank_name": "Paramount Universal Bank",
    "bank_code": "50"
  },
  {
    "bank_name": "Jamii Bora Bank",
    "bank_code": "51"
  },
  {
    "bank_name": "Guaranty Bank",
    "bank_code": "53"
  },
  {
    "bank_name": "Victoria Commercial Bank",
    "bank_code": "54"
  },
  {
    "bank_name": "Guardian Bank",
    "bank_code": "55"
  },
  {
    "bank_name": "I&M Bank",
    "bank_code": "57"
  },
  {
    "bank_name": "DTB",
    "bank_code": "63"
  },
  {
    "bank_name": "Sidian Bank",
    "bank_code": "66"
  },
  {
    "bank_name": "Equity Bank",
    "bank_code": "68"
  },
  {
    "bank_name": "Family Bank",
    "bank_code": "70"
  },
  {
    "bank_name": "Gulf African Bank",
    "bank_code": "72"
  },
  {
    "bank_name": "First Community Bank",
    "bank_code": "74"
  },
  {
    "bank_name": "KWFT Bank",
    "bank_code": "78"
  },
  {
    "bank_name": "Housing Finance Company Limited (HFCK)",
    "bank_code": "61"
  },
  {
    "bank_name": "Mayfair Bank Limited",
    "bank_code": "65"
  }
]

The bank_code is what we'll need for the next request.

Step 1 - Initiate Bank Transfer

To initiate a bank transfer, you'll need the user name, bank account and the bank code. The bank code help us to identify the beneficiary bank.

📘

Scope and Limits

Note this API currently only send to domestic banks in Kenya. The minimum you can send is KES. 10 and a maximum of KES. 999,999. We use PesaLink for disbursements and the supported currency is the Kenya Shilling (KES) at the moment.

from intasend import APIService

service = APIService(token=token, private_key=private_key)

transactions = [{'name': 'Joe Doe', 'account': "0129292920202", 'bank_code': '11', 'amount':20000, 'narrative': 'Salary'},
                {'name': 'Mary Doe', 'account': "525623632321", 'bank_code': '2', 'amount': 10000, 'narrative': 'Invoice 122'}]

response = service.transfer.bank(device_id=<DEVICE-ID>, currency='KES', transactions=transactions)
print(response)
use IntaSend\IntaSendPHP\Transfer;

$transactions = [
    ['name' => 'Joe Doe','account'=>'0129292920202','amount'=>'200', 'bank_code'=>'2', 'narrative': 'Bill Payment'],
    ['name' => 'Mary Doe','account'=>'525623632321','amount'=>'150', 'bank_code'=>'11', 'narrative': 'Purchase']
];

$transfer = new Transfer();
$transfer->init($credentials);

$response=$transfer->bank('<DEVICE-ID>', "KES", $transactions);
const IntaSend = require('intasend-node');

const intasend = new IntaSend(/*...Authenticate*/)

let payouts = intasend.payouts();

payouts
    .bank({
        device_id: '<DEVICE-ID>',
        currency: 'KES',
        transactions = [{
            name: 'Joe Doe',
            account: '0129292920202',
            bank_code: '2',
            amount: 200,
            narrative: 'Purchase'
        }, {
            name: 'Mary Doe',
            account: '525623632321',
            bank_code: '11',
            amount: 500,
            narrative: 'Purchase'
        }]
    })
    .then((resp) => {
        console.log(`Payouts response: ${resp}`);
        // Approve payouts method can be called here if you would
            // like to auto-approve immediately
    })
    .catch((err) => {
        console.error(`Payouts error: ${err}`);
    });

Step 2: How to Approve a Bank Transaction

Response from Step 1 is passed to the approve function. The approve function signs the nonce as the Nonce and Encryption Signatures guidelines.

approved_response = service.transfer.approve(response)
print(approved_response)
$response = $transfer->approve($response);
print_r($response);
payouts
    .approve(resp, false)
    .then((resp) => {
        console.log(`Payouts approve: ${resp}`);
    })
    .catch((err) => {
        console.error(`Payouts approve error: ${err}`);
    });

Check the Transaction Status reference for more details on transaction codes and meaning.