PHPackages                             kevinpurwito/laravel-zenziva - 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. kevinpurwito/laravel-zenziva

ActiveLibrary

kevinpurwito/laravel-zenziva
============================

Zenziva integration for Laravel

1.0.0(4y ago)02.4kMITPHPPHP ^7.4|^8.0

Since Aug 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kevinpurwito/laravel-zenziva)[ Packagist](https://packagist.org/packages/kevinpurwito/laravel-zenziva)[ Docs](https://github.com/kevinpurwito/laravel-zenziva)[ Fund](https://www.paypal.me/kevinpurwito)[ RSS](/packages/kevinpurwito-laravel-zenziva/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

About Laravel Zenziva
=====================

[](#about-laravel-zenziva)

[![Tests](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/run-tests.yml)[![Code Style](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/php-cs-fixer.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/php-cs-fixer.yml)[![Psalm](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/psalm.yml/badge.svg?branch=main)](https://github.com/kevinpurwito/laravel-zenziva/actions/workflows/psalm.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/8293590e68b0fd27474de6e35b87fb1606f074446091d49384d792e405b481ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6576696e7075727769746f2f6c61726176656c2d7a656e7a6976612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-zenziva)[![Total Downloads](https://camo.githubusercontent.com/da37a660bf44baf196feff814375205681c83a57ffdbd4cd1ce708cf347e0332/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6576696e7075727769746f2f6c61726176656c2d7a656e7a6976612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kevinpurwito/laravel-zenziva)

Laravel Zenziva is a package that integrates [Zenziva](https://www.zenziva.id/) for Laravel.

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

[](#installation)

You can install the package via composer:

```
composer require kevinpurwito/laravel-zenziva
```

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

[](#configuration)

The `vendor:publish` command will publish a file named `kp_zenziva.php` within your laravel project config folder `config/kp_zenziva.php`.

Published Config File Contents

```
[
    'type' => strtolower(env('KP_ZENZIVA_TYPE', 'console')), // gsm or console

    'userkey' => env('KP_ZENZIVA_USERKEY'),

    'passkey' => env('KP_ZENZIVA_PASSKEY'),
];
```

Alternatively you can ignore the above publish command and add this following variables to your `.env` file.

```
KP_ZENZIVA_TYPE=console
KP_ZENZIVA_USERKEY=user
KP_ZENZIVA_PASSKEY=secret

```

Auto Discovery
--------------

[](#auto-discovery)

If you're using Laravel 5.5+ you don't need to manually add the service provider or facade. This will be Auto-Discovered. For all versions of Laravel below 5.5, you must manually add the ServiceProvider &amp; Facade to the appropriate arrays within your Laravel project `config/app.php`

### Provider

[](#provider)

```
[
    Kevinpurwito\LaravelZenziva\ZenzivaServiceProvider::class,
];
```

### Alias / Facade

[](#alias--facade)

```
[
    'Zenziva' => Kevinpurwito\LaravelZenziva\ZenzivaFacade::class,
];
```

Usage
-----

[](#usage)

```
use Kevinpurwito\LaravelZenziva\ZenzivaFacade as Zenziva;

// returns the balance/credit that you have
Zenziva::getBalance();

// returns the balance/credit that you have, including the expiry date of the balance
Zenziva::balance();

// send SMS
Zenziva::sendSms('+62xxx', 'message');

// send Whatsapp message
Zenziva::sendWa('+62xxx', 'message');

// send Whatsapp file from URL, including a caption/message
Zenziva::sendWaFile('+62xxx', 'message', 'https://image.com/image.png');

// GSM only feature to send SMS OTP
Zenziva::sendOtp('+62xxx', '123xxx');

// Console only feature to send voice message
Zenziva::sendWa('+62xxx', 'message');
```

> Accepted file types for `sendWaFile()` are: .doc .pdf .xls .xlsx .csv .gif .jpg .mp4 .mp3

### Handling the response

[](#handling-the-response)

```
use Kevinpurwito\LaravelZenziva\ZenzivaFacade as Zenziva;

// returns the balance/credit that you have
$response = Zenziva::sendWa('+62xxx', 'message');

if ($response->getStatusCode() == 201) {
    // if you want to check the response body, such as `messageId` you can do this:
    $content = json_decode($response->getBody()->getContents());
    dump($content);
//    {
//        "messageId":"157365",
//        "to":"+62xxx",
//        "status":"1",
//        "text":"Success"
//    }
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kevin Purwito](https://github.com/kevinpurwito)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com)by [Beyond Code](http://beyondco.de/)with some modifications inspired from [PHP Package Skeleton](https://github.com/spatie/package-skeleton-php)by [spatie](https://spatie.be/).

###  Health Score

27

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

1684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47e3d5e05f33c7b66c0c646fbce5dac5a319a8fd7ebb13977d2a1ae3df91e9a4?d=identicon)[kevinpurwito](/maintainers/kevinpurwito)

---

Top Contributors

[![kevinpurwito](https://avatars.githubusercontent.com/u/11625012?v=4)](https://github.com/kevinpurwito "kevinpurwito (6 commits)")

---

Tags

laravelzenzivakevinpurwito

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kevinpurwito-laravel-zenziva/health.svg)

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

###  Alternatives

[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27330.5k](/packages/rahulalam31-laravel-abuse-ip)

PHPackages © 2026

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