PHPackages                             bundana/services - 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. bundana/services

ActiveLibrary[API Development](/categories/api)

bundana/services
================

List of API services for development e.g. SMS, WhatsApp, email, etc.

v2.0(1y ago)1101MITPHP

Since Feb 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bundana/Laravel-Value-Added-Services)[ Packagist](https://packagist.org/packages/bundana/services)[ Docs](https://github.com/bundana/Laravel-Value-Added-Services)[ RSS](/packages/bundana-services/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

Mnotify SMS API Integration
===========================

[](#mnotify-sms-api-integration)

This package provides an easy-to-use interface for integrating the Mnotify SMS API into your PHP applications. The package allows you to send single and bulk SMS, check SMS balance, and register sender IDs with the Mnotify API.

**Installation**
----------------

[](#installation)

To use this package, make sure you have the following environment variables set in your `.env` file:

```
MNOTIFY_API_KEY=your_api_key
MNOTIFY_SENDER_ID=your_sender_id
MNOTIFY_API_KEY_V2=your_api_key_v2
MNOTIFY_SENDER_ID_V2=your_sender_id_v2
```

### **Basic Usage**

[](#basic-usage)

### 1. **Sending a Single SMS**

[](#1-sending-a-single-sms)

To send a single SMS, you can use the `Mnotify::to()` method to specify the recipient’s phone number, followed by the `message()` method to set the SMS content. Finally, call `send()` to dispatch the message.

```
use Bundana\Services\Messaging\Mnotify;

// Example of sending a single SMS
$response = Mnotify::to('1234567890') // recipient phone number
    ->message('Hello, this is a test message!') // message content
    ->send(); // send the message

// The $response will contain the success status and details of the send operation
echo $response;
```

### 2. **Checking SMS Balance**

[](#2-checking-sms-balance)

To check your SMS balance, use the `SMSBalance()` method. This can be done for both API version 1 (default) and version 2.

```
use Bundana\Services\Messaging\Mnotify;

// Example of checking balance
$response = Mnotify::SMSBalance(); // by default, checks using version 1

// If you need to check balance using version 2
$response_v2 = Mnotify::SMSBalance('v2');

// The $response will contain the SMS balance or an error message
echo $response;
```

### 3. **Sending Bulk SMS**

[](#3-sending-bulk-sms)

To send bulk SMS to multiple recipients, use the `sendBulk()` method. This method takes an associative array where the keys are phone numbers and the values are the corresponding messages to send.

```
use Bundana\Services\Messaging\Mnotify;

// Example of sending bulk SMS
$contactsAndMessages = [
    '1234567890' => 'Message to recipient 1',
    '0987654321' => 'Message to recipient 2',
    '5555555555' => 'Message to recipient 3',
];

$response = Mnotify::sendBulk($contactsAndMessages); // sending using version 1 by default

// To send using version 2, pass the 'v2' as a second argument
$response_v2 = Mnotify::sendBulk($contactsAndMessages, 'v2');

// The $response will contain the success status and details of the send operation
print_r($response);
```

### 4. **Registering a Sender ID**

[](#4-registering-a-sender-id)

To register a sender ID with Mnotify, use the `registerSenderID()` method. This method takes two parameters: the sender ID and the purpose for registering the sender ID.

```
use Bundana\Services\Messaging\Mnotify;

// Example of registering a sender ID
$senderId = 'MySenderID';
$purpose = 'Transactional Messages';

$response = Mnotify::registerSenderID($senderId, $purpose);

// The $response will contain the success status and details of the registration
echo $response;
```

### **Additional Features**

[](#additional-features)

- **Set Custom API Keys**: You can dynamically set API keys using the `newKeys()` method if you need to override the environment variables.

    Example:

    ```
    $customKeys = [
        'apiKey' => 'custom_api_key',
        'sender_id' => 'custom_sender_id',
    ];

    $response = Mnotify::to('1234567890')
        ->message('Hello, custom API keys!')
        ->newKeys($customKeys)
        ->send();
    ```
- **Scheduled SMS**: To schedule SMS for future delivery, you can pass a `schedule_date` to the `send()` method.

    Example:

    ```
    $response = Mnotify::to('1234567890')
        ->message('This message will be sent later!')
        ->send(null, '2024-10-31 10:00:00');
    ```

### **Error Handling**

[](#error-handling)

Each method returns a JSON-encoded response. If an error occurs, the response will include an error message and a status of `false`.

Example error response:

```
{
    "success": false,
    "message": "Invalid recipient number."
}
```

### **API Versioning**

[](#api-versioning)

By default, the package uses Mnotify API version 1 (`v1`). If you need to use API version 2, pass `'v2'` as a parameter when sending messages or checking the balance.

### **License**

[](#license)

This package is open-source and licensed under the MIT License.

---

This `README.md` file provides comprehensive documentation for using the Mnotify class, covering the key functionalities such as sending SMS, checking balance, bulk SMS, and registering sender IDs. You can further extend this document with additional details if required.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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 ~60 days

Total

5

Last Release

581d ago

Major Versions

v1.0.3 → v2.02024-10-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a68134c8fdae947839a2b668eafb24ac78a2045af5b2632d3ff88008c47d169?d=identicon)[bundana](/maintainers/bundana)

---

Top Contributors

[![bundana](https://avatars.githubusercontent.com/u/65686807?v=4)](https://github.com/bundana "bundana (15 commits)")

### Embed Badge

![Health badge](/badges/bundana-services/health.svg)

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

###  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)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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