PHPackages                             gavabridge/kra - 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. gavabridge/kra

ActiveLibrary

gavabridge/kra
==============

Simple Laravel SDK for KRA (GavaConnect) APIs

1.0.8(8mo ago)17↓50%MITPHPPHP ^8.1|^8.2|^8.3CI failing

Since Aug 21Pushed 8mo agoCompare

[ Source](https://github.com/ImSidow/GavaBridge)[ Packagist](https://packagist.org/packages/gavabridge/kra)[ RSS](/packages/gavabridge-kra/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

GavaBridge
==========

[](#gavabridge)

A simple, clean, and developer-friendly Laravel SDK that bridges your Laravel app with **Kenya Revenue Authority (KRA) APIs** via [GavaConnect](https://developer.go.ke/apis).
It simplifies authentication, token caching, and request handling, letting you focus on building your product.

---

Features
--------

[](#features)

- 🔑 Automatic OAuth2 (client credentials) token management
- 📡 Easy access to common KRA endpoints:
    - PIN validation
    - TCC validation
    - Taxpayer obligations &amp; liabilities
    - Excise license check
    - NIL return filing
- 🧩 Extendable: add more endpoints in minutes
- ⚡ Built for Laravel 10+ / 11

---

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

[](#installation)

1. Require the package:

    ```
    composer require gavabridge/kra
    ```
2. Publish the config:

    ```
    php artisan vendor:publish --tag=gavabridge-config
    ```
3. Add credentials in `.env`:

    ```
    KRA_ENV=sandbox
    KRA_CONSUMER_KEY=your_consumer_key
    KRA_CONSUMER_SECRET=your_consumer_secret
    ```

---

Usage
-----

[](#usage)

You can access all endpoints via the **`GavaBridge` facade**:

```
use GavaBridge\Kra\Facades\Kra;

// PIN validation
$result = Kra::pin()->validateByPin('A000000010');

// TCC validation
$check = Kra::tcc()->validate('A000000010', 'TCC-12345678');

// Obligations
$obls = Kra::taxpayer()->obligations('A000000010');

// Liabilities
$libs = Kra::taxpayer()->liabilities('A000000010');

// Excise license
$lic = Kra::excise()->checkByNumber('EXC-0001234');

// NIL return (payload from portal spec)
$resp = Kra::returns()->fileNil([
     "TAXPAYERDETAILS" => [
        "TaxpayerPIN" => "A000000000L",
        "ObligationCode" => "4",
        "Month" => "04",
        "Year" => "2000"
     ]
    /* ... other fields per API spec ... */
]);
```

---

Roadmap
-------

[](#roadmap)

- Add Import Certificate Checker
- Add Excise License by PIN
- Add E-Slip Checker
- Add eTIMS (OSCU/VSCU) support

---

License
-------

[](#license)

MIT © 2025 – ASAD ALI SIDOW

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff3ad58265aa4163fdb3f07063b74ab63fa2fbd97168fdc85f1cfcda374f3007?d=identicon)[ImSidow](/maintainers/ImSidow)

---

Top Contributors

[![ImSidow](https://avatars.githubusercontent.com/u/73076630?v=4)](https://github.com/ImSidow "ImSidow (34 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/gavabridge-kra/health.svg)

```
[![Health](https://phpackages.com/badges/gavabridge-kra/health.svg)](https://phpackages.com/packages/gavabridge-kra)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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