PHPackages                             xililo/airtel - 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. [API Development](/categories/api)
4. /
5. xililo/airtel

ActiveLibrary[API Development](/categories/api)

xililo/airtel
=============

Intuitive and Comprehensive AIRTEL SDK for PHP Applications. Just Plug 'N Play

13PHP

Since Dec 10Pushed 1y agoCompare

[ Source](https://github.com/xililo/airtel)[ Packagist](https://packagist.org/packages/xililo/airtel)[ RSS](/packages/xililo-airtel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Airtel Money API PHP SDK
========================

[](#airtel-money-api-php-sdk)

This fork is to ensure continuity of the projevt and to set some further customizations and imptovements. Thanks to [osenco/airtel](https://github.com/osenco/airtel)Airtel Money API PHP SDK.

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

[](#installation)

```
composer require xililo/airtel
```

Collection APIs
---------------

[](#collection-apis)

### Instantiate

[](#instantiate)

```
use xililo\Airtel\Collection;

$collectAPI = new Collection(
    array(
        'env'           => 'live',
        'client_id'     => 'YOUR_CLIENT_ID',
        'client_secret' => 'YOUR_CLIENT_SECRET',
        'public_key'    => 'YOUR_PUBLIC_KEY',
        'country'       => 'Transaction Country Code e.g KE',
        'currency'      => 'Transaction Currency Code e.g KES'
    )
);
```

### STK/USSD Push

[](#stkussd-push)

```
$collectAPI->authorize()->ussdPush($phone, $amount);
```

Note : Do not send country code in phone number.

You can pass a token to the authorize method if you have a caching mechanism instead of creating a new one each time. You can pass a second argument that is a callback function that updates your token

```
$token = ''; // Get your token from database, redis or whichever cache you use.
$collectAPI->authorize($token, function($newToken) {
    print($newToken);
    // Save/update $newToken in your database
})->ussdPush($phone, $amount);
```

Disbursement APIs
-----------------

[](#disbursement-apis)

```
use xililo\Airtel\Disbursement;

$disburseAPI = new Disbursement(
    array(
        'env'           => 'live',
        'client_id'     => 'YOUR_CLIENT_ID',
        'client_secret' => 'YOUR_CLIENT_SECRET',
        'public_key'    => 'YOUR_PUBLIC_KEY',
        'country'       => 'Transaction Country Code e.g KE',
        'currency'      => 'Transaction Currency Code e.g KES'
    )
);
```

Then send the money

```
$disburseAPI->authorize()->send($phone, $amount);
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 54.5% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f38178a9564b1d087bf5e18363ef720bdf4c80229e04a6a24e0cff104dbd5ac?d=identicon)[xililo](/maintainers/xililo)

---

Top Contributors

[![xililo](https://avatars.githubusercontent.com/u/64233070?v=4)](https://github.com/xililo "xililo (12 commits)")[![maukoese](https://avatars.githubusercontent.com/u/14233942?v=4)](https://github.com/maukoese "maukoese (10 commits)")

### Embed Badge

![Health badge](/badges/xililo-airtel/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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