PHPackages                             kazinokib/bdappsapi - 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. kazinokib/bdappsapi

ActiveLibrary[API Development](/categories/api)

kazinokib/bdappsapi
===================

A Laravel package for BDApps API integration

1.0.0(1y ago)019MITPHPPHP ^7.3|^8.0|^8.1|^8.2

Since Sep 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kazinokib/bdapps-pro-api)[ Packagist](https://packagist.org/packages/kazinokib/bdappsapi)[ RSS](/packages/kazinokib-bdappsapi/feed)WikiDiscussions main Synced 1mo ago

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

BDApps API Laravel Package
==========================

[](#bdapps-api-laravel-package)

This Laravel package provides an easy-to-use interface for integrating with the BDApps API, allowing you to send SMS, handle USSD sessions, manage OTP, and perform CAAS operations in your Laravel applications.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Usage](#usage)
    - [SMS Service](#sms-service)
    - [USSD Service](#ussd-service)
    - [OTP Service](#otp-service)
    - [CAAS Service](#caas-service)
4. [Error Handling](#error-handling)
5. [Contributing](#contributing)
6. [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require kazinokib/bdappsapi
```

Configuration
-------------

[](#configuration)

After installation, publish the configuration file:

```
php artisan vendor:publish --provider="Kazinokib\BdappsApi\BdappsApiServiceProvider" --tag="config"
```

This will create a `config/bdappsapi.php` file in your app's configuration directory. You should configure your BDApps API credentials in your `.env` file:

```
BDAPPS_APP_ID=your_app_id
BDAPPS_APP_PASSWORD=your_app_password
BDAPPS_BASE_URL=https://developer.bdapps.com

```

Usage
-----

[](#usage)

### SMS Service

[](#sms-service)

To send an SMS:

```
use Kazinokib\BdappsApi\BdappsApi;

public function sendSms(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->smsService->send('Your message', ['tel:8801812345678']);
    // Handle the result
}
```

### Receive SMS

[](#receive-sms)

```
use Kazinokib\BdappsApi\BdappsApi;

public function receiveSms(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->smsService->receiveSms();
    // Handle the result
}
```

### USSD Service

[](#ussd-service)

To send a USSD message:

```
use Kazinokib\BdappsApi\BdappsApi;

public function sendUssd(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->ussdService->send('Your message', 'session_id', 'tel:8801812345678');
    // Handle the result
}
```

### OTP Service

[](#otp-service)

To request an OTP:

```
use Kazinokib\BdappsApi\BdappsApi;

public function requestOtp(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->otpService->requestOtp('tel:8801812345678');
    // Handle the result
}
```

To verify an OTP:

```
use Kazinokib\BdappsApi\BdappsApi;

public function verifyOtp(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->otpService->verifyOtp('reference_no', 'otp_code');
    // Handle the result
}
```

### CAAS Service

[](#caas-service)

To query balance:

```
use Kazinokib\BdappsApi\BdappsApi;

public function queryBalance(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->caasService->queryBalance('tel:8801812345678');
    // Handle the result
}
```

To perform a direct debit:

```
use Kazinokib\BdappsApi\BdappsApi;

public function directDebit(BdappsApi $bdappsApi)
{
    $result = $bdappsApi->caasService->directDebit('external_tx_id', 'tel:8801812345678', 10.00);
    // Handle the result
}
```

Error Handling
--------------

[](#error-handling)

All services throw a `BdappsApiException` on error. You should catch this exception and handle it appropriately:

```
use Kazinokib\BdappsApi\Exceptions\BdappsApiException;

try {
    $result = $bdappsApi->smsService->send('Your message', ['tel:8801812345678']);
} catch (BdappsApiException $e) {
    // Handle the exception
    $errorCode = $e->getErrorCode();
    $errorDetail = $e->getErrorDetail();
}
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

610d ago

### Community

Maintainers

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

---

Top Contributors

[![n0k1b](https://avatars.githubusercontent.com/u/24321013?v=4)](https://github.com/n0k1b "n0k1b (9 commits)")[![kazinokib](https://avatars.githubusercontent.com/u/176520633?v=4)](https://github.com/kazinokib "kazinokib (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kazinokib-bdappsapi/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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