PHPackages                             akika/laravel-ncba - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. akika/laravel-ncba

ActiveLibrary[Payment Processing](/categories/payments)

akika/laravel-ncba
==================

The Laravel NCBA package allows you to transfer money through the NCBA Open Banking APIs. The package supports Laravel version 5 and above.

v0.2.1(1mo ago)1424—0%1MITPHPPHP ^8.0|^8.1|^8.2

Since Jan 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/akikadigital/laravel-ncba)[ Packagist](https://packagist.org/packages/akika/laravel-ncba)[ Docs](https://github.com/Akika-Digital/laravel-ncba)[ RSS](/packages/akika-laravel-ncba/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (3)Versions (24)Used By (0)

Laravel NCBA Package by [Akika Digital](https://akika.digital)
--------------------------------------------------------------

[](#laravel-ncba-package-by-akika-digital)

The Laravel NCBA package allows you to transfer money through the NCBA Open Banking APIs. The package supports Laravel version 5 and above.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require akika/laravel-ncba
```

After installing the package, publish the configuration file using the following command:

```
php artisan ncba:install
```

This will import ncba.php config file in your project config directory where you can set your NCBA related parameters and other configuration options.

.env file Setup
---------------

[](#env-file-setup)

Add the following configurations into your .env file

```
NCBA_ENV= # This value is either sandbox or production. This config variable - This is required to enable Laravel NCBA pick the required variables.
NCBA_DEBUG= # This value is true or false. If true, the app will write debug logs.
NCBA_SANDBOX_API_KEY= # The provided sandbox API Key. Contact NCBA for this key.
NCBA_SANDBOX_USERNAME= # Sandbox username
NCBA_SANDBOX_PASSWORD= # Sandbox password
NCBA_SANDBOX_URL= # Sandbox API URL
NCBA_PRODUCTION_API_KEY= # You will reveive this key after you are fully onboarded onto NCBA Online Banking API.
NCBA_PRODUCTION_USERNAME= # Production username
NCBA_PRODUCTION_PASSWORD= # Production password
NCBA_PRODUCTION_URL= # Production API URL
```

Package Upgrade
---------------

[](#package-upgrade)

To upgrade Laravel NCBA Package to the latest version, run the following command

```
composer update akika/laravel-ncba
```

Usage
-----

[](#usage)

### Initialize NCBA

[](#initialize-ncba)

```
use Akika\LaravelNcba\Ncba;

// You can initialize the class without passing any parameters. In this case, you must ensure the credentials are in the .env file
$ncba = new Ncba();

// or

// You can also override the variables as shown below. In this case, the package will ignore the variables in the config file.
$ncba = new Ncba($apiKey, $username, $password);
```

- The packag will process the credentials from the config variables provided

### Authentication

[](#authentication)

An AP token is required to authenticate and use NCBA API's. Below is how to authenticate.

```
$ncba->authenticate();
```

Account Details
---------------

[](#account-details)

Gets account details including account balance.

```
$ncba->accountDetails($apiToken, $countryCode, $accountNo);
```

Mini Statement
--------------

[](#mini-statement)

Gets a mini statement for the account

```
$ncba->miniStatement($apiToken, $countryCode, $accountNo);
```

Account Statement
-----------------

[](#account-statement)

Gets an account statement based on the the specified period of time. The date format is 'ddmmyyyy'

```
$ncba->accountStatement($apiToken, $countryCode, $accountNo, $fromDate, $toDate);
```

### Check Transaction Status

[](#check-transaction-status)

```
$ncba = new Ncba();
$response = $ncba->checkTransactionStatus($apiToken, $countryCode, $transactionID);
```

#### Success Response

[](#success-response)

Below is a sample result for a successful transaction.

```
{
    "ErrorCode": "000",
    "ErrorMessage": "Success",
    "TransactionId": "String",
    "CoreReference": "String",
}
```

Below is a transaction successful result

```
{
    "resultCode": "000",
    "statusDescription": "SUCCESS",
    "cbxReferenceNumber": "IFT123454-3",
    "txnReferenceNo": "FTX24211TAACS"
}
```

### Send Money to Another NCBA Customer (Internal Transfer)

[](#send-money-to-another-ncba-customer-internal-transfer)

```
$ncba = new Ncba();

$response = $ncba->ift($apiToken, $country, $transactionID, $beneficiaryAccountNumber, $beneficiaryAccountName, $senderAccountNumber, $currency, $amount $narration);
```

#### IFT Payment rules

[](#ift-payment-rules)

- The following rules apply when using the Laravel NCBA package

1. Transaction can be settled in all major currencies, i.e. KES, UGX, TZS, RWF, EUR, GBP &amp; USD.
2. Settlement is immediate; real-time.
3. Payments will be within country of origin, local b2b.
4. Minimum payments of KES. 50 or its equivalent in other currency, no limit on Maximum payment.
5. Transactions processing is 24/7 – 365, including weekends and public holidays.

### Send Money to a Non-NCBA Customer (External Transfer)

[](#send-money-to-a-non-ncba-customer-external-transfer)

```
$ncba = new Ncba();

$response = $ncba->eft($apiToken, $amount, $beneficiaryAccountNumber, $beneficiaryBankBic, $beneficiaryName, $currency, $senderAccountNumber, $narration, $senderCountry, $transactionID, $senderCIF);
```

#### EFT payment rules.

[](#eft-payment-rules)

1. Transaction can be settled in only in local currency, KES, UGX, TZS &amp; RWF.
2. Settlement is processed T+ 1 day.
3. Payments will be within country of origin, local b2b.
4. Minimum payments of KES. 50 or its equivalent in other currency and a maximum of KES. 999,999 or it’s equivalent in other local currency.
5. Transactions processing is only on working days, Monday – Friday, excluding Weekends and Public Holidays.

### Send Money via RTGS (External Transfer)

[](#send-money-via-rtgs-external-transfer)

```
$ncba = new Ncba();

$response = $ncba->rtgs($apiToken, $beneficiaryAccountNumber, $beneficiaryBankBIC, $beneficiaryCountry, $beneficiaryName, $creditAmount, $creditCurrency, $debitCurrency, $narration, $senderAccountNumber, $senderCIF, $senderCountry, $purposeCode, $transactionID);
```

#### Payment Rules

[](#payment-rules)

- The following rules apply when using the Laravel NCBA package

1. Transaction settled in KES, USD,GBP,EUR,TZS,UGX &amp; RWF.
2. Settlement is T+ 3hours on a working day, typically Monday – Friday before 15.00 HRS EAT.
3. Payments will be within Country of Origin.
4. Minimum payments of KES. 50 or its equivalent in any other acceptable currency with no maximum CAP.
5. Purpose of Payment Code (POP) will be required for all outgoing payments - The list of POP codes to be maintained to be shared during onboarding.

### Send Money via Pesalink (External Transfer)

[](#send-money-via-pesalink-external-transfer)

```
$ncba = new Ncba();

$response = $ncba->pesalink($apiToken, $beneficiaryAccountNumber, $beneficiaryBankBIC, $beneficiaryName, $amount, $currency, $narration, $senderAccountNumber, $senderCIF, $senderCountry, $transactionID);
```

#### Pesalink payment rules

[](#pesalink-payment-rules)

1. Transaction settled in KES only.
2. Settlement is processed immediately.
3. Payments will be within Kenya only.
4. Minimum payments of KES. 50 or its equivalent in other currency and a maximum of KES. 999,999 or it’s equivalent in other local currency.
5. Payments are settled 24/7-365, including weekends and public holidays.

Sample Responses
----------------

[](#sample-responses)

### Successful Transaction Sample Response

[](#successful-transaction-sample-response)

```
{
   "Response Code":0,
   "Reference":"FTC250124JEQT",
   "Description":"Success"
}
```

### Unsuccessful Transaction Sample Response

[](#unsuccessful-transaction-sample-response)

```
{
    "Response Code":11,
    "Reference":"DUPLICATE | FTC210920APDH",
    "Description":"ERROR"
}
```

### Transaction Status API Response

[](#transaction-status-api-response)

```
{
    "Code": "000",
    "Description": "Success",
    "Transaction": {
        "Currency": "KES",
        "Amount": "100",
        "Date": "1/24/2025 12:37:21 PM",
        "AccountNumber": "7810710012",
        "Narrative": "Other",
        "CustomerReference": "250124093719",
        "CBSReference": "FTC250124JEQS",
        "ThirdPartyReference": null,
        "Status": "PASSED",
        "ThirdPartyStatus": null
    }
}
```

### KPLC Postpaid

[](#kplc-postpaid)

NCBA offers a two-step API request as follows:

### KPLC postpaid validation

[](#kplc-postpaid-validation)

```
/**
 * ...
 * @param $msisdn - the mobile number attached to the meter
 */
```

```
$ncba->kplcPostpaidValidation($apiToken, $meterNumber, $msisdn);
```

### KPLC postpaid payment request

[](#kplc-postpaid-payment-request)

```
$ncba->kplcPostpaid($apiToken, $validationId, $customerName, $meterNumber, $msisdn, $channelRef, $amount, $callbackUrl, $accountNumber, $reason = '');
```

License
-------

[](#license)

The Laravel NCBA package is open-sourced software licensed under the MIT license. See the LICENSE file for details.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance89

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~16 days

Recently: every ~70 days

Total

23

Last Release

56d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b9d9e3a6ef73a3692c261d49a7a70d0362c5e83fa9a4e8765eb9309173b59b3?d=identicon)[akika.digital](/maintainers/akika.digital)

---

Top Contributors

[![fenicfelix](https://avatars.githubusercontent.com/u/7171039?v=4)](https://github.com/fenicfelix "fenicfelix (71 commits)")

---

Tags

akikaakikadigitallaravelloopncbapayment-gatewaypayment-gateway-integrationpaymentsphppaymentAkikadigitalncbancba phpncba laravelncba open banking

### Embed Badge

![Health badge](/badges/akika-laravel-ncba/health.svg)

```
[![Health](https://phpackages.com/badges/akika-laravel-ncba/health.svg)](https://phpackages.com/packages/akika-laravel-ncba)
```

###  Alternatives

[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
