evans-wanguba/kcb-bank-buni-api

This is a PHP package for handling KCB Bank Buni web service integration

v1.0.0 2024-08-08 14:26 UTC

This package is auto-updated.

Last update: 2024-10-15 11:52:55 UTC


README

This is a PHP package for KCB Bank Buni web service integration. Buni is designed for the modern innovator. Developers can now leverage on the KCB API to offer their customers a seamless digital experience on their platforms. Buni helps you integrate a unified payment system onto your website or app, allowing customers to easily pay for your product or service. For more information, check out KCB Buni API Guide.

Installation

Pull in the package through Composer.

composer require evans-wanguba/kcb-bank-buni-api

Create the following variables in your .env file.

BUNI_ACCESS_TOKEN=AccessToken
BUNI_ENV=sandbox

Supported API Services

  • BancAssuranceFileService
  • FundsTransferAPIService
  • MpesaExpressAPIService
  • MpesaTransactionInfo
  • QueryCoreTransactionStatus
  • ValidateExternalBill
  • VendingGatewayApis

Usage

To make a fund transfer request is simple. Just initiate the BuniApi and post the transaction:

use EvansWanguba\KcbBank\BuniApi;

require "vendor/autoload.php";

// FundsTransferAPIService
$buni = new BuniApi();
$fundsTransferParams = [
    "beneficiaryDetails"    => "JOHN DOE",
    "companyCode"           => "KE0010001",
    "creditAccountNumber"   => "1279287799",
    "currency"              => "KES",
    "debitAccountNumber"    => "1279258233",
    "debitAmount"           => 26.0,
    "paymentDetails"        => "UT Fund withdrawal",
    "transactionReference"  => "FT1234567890",
    "transactionType"       => "IF",
    "beneficiaryBankCode"   => "01"
];
$buni->postFundsTransferAPIService($fundsTransferParams);

Support

See sample.php for more examples. Or email me at ewanguba@gmail.com