PHPackages                             zevpay/laravel - 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. [Payment Processing](/categories/payments)
4. /
5. zevpay/laravel

ActiveLibrary[Payment Processing](/categories/payments)

zevpay/laravel
==============

Laravel integration for ZevPay Checkout — service provider, facade, webhook handling, and event dispatching

v0.1.0(3mo ago)00MITPHPPHP &gt;=8.1

Since Mar 11Pushed 3mo agoCompare

[ Source](https://github.com/zevpay/checkout-laravel)[ Packagist](https://packagist.org/packages/zevpay/laravel)[ RSS](/packages/zevpay-laravel/feed)WikiDiscussions main Synced 3w ago

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

ZevPay for Laravel
==================

[](#zevpay-for-laravel)

Laravel integration for [ZevPay Checkout](https://docs.zevpaycheckout.com). Provides a service provider, facade, webhook handling with signature verification, and event dispatching.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require zevpay/laravel
```

The package uses Laravel auto-discovery, so no manual provider registration is needed.

Publish the config file:

```
php artisan vendor:publish --tag=zevpay-config
```

Add your API keys to `.env`:

```
ZEVPAY_SECRET_KEY=sk_live_your_secret_key
ZEVPAY_PUBLIC_KEY=pk_live_your_public_key
ZEVPAY_WEBHOOK_SECRET=whsec_your_webhook_secret
```

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use ZevPay\Laravel\Facades\ZevPay;

// Initialize a checkout session
$session = ZevPay::checkout()->initialize([
    'amount' => 500000, // ₦5,000 in kobo
    'email' => 'customer@example.com',
    'reference' => 'ORDER-123',
    'callback_url' => 'https://yoursite.com/callback',
]);

// Verify a checkout session
$result = ZevPay::checkout()->verify($sessionId);

// Create a transfer
$transfer = ZevPay::transfers()->create([
    'type' => 'bank_transfer',
    'amount' => 100000,
    'account_number' => '0123456789',
    'bank_code' => '044',
    'narration' => 'Payout',
]);

// Create an invoice
$invoice = ZevPay::invoices()->create([
    'customer_name' => 'Jane Doe',
    'customer_email' => 'jane@example.com',
    'due_date' => '2026-04-01',
    'line_items' => [
        ['description' => 'Web design', 'quantity' => 1, 'unit_price' => 5000000],
    ],
]);
```

### Dependency injection

[](#dependency-injection)

```
use ZevPay\ZevPay;

class PaymentController extends Controller
{
    public function checkout(ZevPay $zevpay)
    {
        $session = $zevpay->checkout->initialize([
            'amount' => 500000,
            'email' => 'customer@example.com',
        ]);

        return redirect($session['checkout_url']);
    }
}
```

### Available resources

[](#available-resources)

ResourceFacade accessorMethodsCheckout`ZevPay::checkout()``initialize`, `verify`, `get`, `selectPaymentMethod`Transfers`ZevPay::transfers()``create`, `list`, `get`, `verify`, `listBanks`, `resolveAccount`, `calculateCharges`, `getBalance`Invoices`ZevPay::invoices()``create`, `list`, `get`, `update`, `send`, `cancel`Static PayID`ZevPay::staticPayId()``create`, `list`, `get`, `update`, `deactivate`, `reactivate`Dynamic PayID`ZevPay::dynamicPayId()``create`, `list`, `get`, `deactivate`Virtual Accounts`ZevPay::virtualAccounts()``create`, `list`, `get`Wallet`ZevPay::wallet()``get`, `update`, `listMembers`, `addMember`, `removeMember`, `updateMember`Webhooks
--------

[](#webhooks)

The package registers a webhook route at `POST /webhooks/zevpay` with automatic signature verification.

### Setup

[](#setup)

1. Copy the webhook URL (`https://yoursite.com/webhooks/zevpay`)
2. Paste it in your [ZevPay Dashboard](https://dashboard.zevpaycheckout.com) webhook settings
3. Copy the webhook secret and add it to `.env` as `ZEVPAY_WEBHOOK_SECRET`

### Listening to events

[](#listening-to-events)

Register listeners in your `EventServiceProvider` or use closures:

```
use ZevPay\Laravel\Events\ChargeSuccess;
use ZevPay\Laravel\Events\TransferSuccess;
use ZevPay\Laravel\Events\WebhookReceived;

// Listen to a specific event
class HandleChargeSuccess
{
    public function handle(ChargeSuccess $event): void
    {
        $reference = $event->payload['data']['reference'];
        $amount = $event->payload['data']['amount'];

        // Update your order, send receipt, etc.
    }
}

// Or listen to all webhook events
class LogAllWebhooks
{
    public function handle(WebhookReceived $event): void
    {
        logger()->info("ZevPay webhook: {$event->eventType}", $event->payload);
    }
}
```

### Available events

[](#available-events)

Event classWebhook type`ChargeSuccess``charge.success``TransferSuccess``transfer.success``TransferFailed``transfer.failed``TransferReversed``transfer.reversed``InvoiceCreated``invoice.created``InvoiceSent``invoice.sent``InvoicePaymentReceived``invoice.payment_received``InvoicePaid``invoice.paid``InvoiceOverdue``invoice.overdue``InvoiceCancelled``invoice.cancelled``WebhookReceived`All events (generic)### Custom webhook path

[](#custom-webhook-path)

Change the webhook path in your `.env`:

```
ZEVPAY_WEBHOOK_PATH=api/webhooks/zevpay
```

### CSRF exemption

[](#csrf-exemption)

The webhook route is automatically excluded from CSRF verification since it uses the `VerifyWebhookSignature` middleware. If you're using Laravel 11+ with the default middleware stack, no additional configuration is needed. For older versions, add the path to your `VerifyCsrfToken` middleware:

```
protected $except = [
    'webhooks/zevpay',
];
```

Artisan commands
----------------

[](#artisan-commands)

```
# Verify your API keys are configured correctly
php artisan zevpay:verify-keys

# Send a test webhook to your endpoint
php artisan zevpay:webhook-test
php artisan zevpay:webhook-test transfer.success
```

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

[](#configuration)

```
// config/zevpay.php
return [
    'secret_key' => env('ZEVPAY_SECRET_KEY'),
    'public_key' => env('ZEVPAY_PUBLIC_KEY'),

    'webhook' => [
        'secret' => env('ZEVPAY_WEBHOOK_SECRET'),
        'path' => env('ZEVPAY_WEBHOOK_PATH', 'webhooks/zevpay'),
    ],

    'options' => [
        'base_url' => env('ZEVPAY_BASE_URL', 'https://api.zevpaycheckout.com'),
        'timeout' => (int) env('ZEVPAY_TIMEOUT', 30),
        'max_retries' => (int) env('ZEVPAY_MAX_RETRIES', 2),
    ],
];
```

Error handling
--------------

[](#error-handling)

The package uses the [ZevPay PHP SDK](https://docs.zevpaycheckout.com/sdks/php) exception hierarchy:

```
use ZevPay\Exceptions\ValidationException;
use ZevPay\Exceptions\AuthenticationException;
use ZevPay\Exceptions\NotFoundException;

try {
    ZevPay::checkout()->initialize([/* ... */]);
} catch (ValidationException $e) {
    // $e->details contains field-level errors
} catch (AuthenticationException $e) {
    // Invalid API key
} catch (NotFoundException $e) {
    // Resource not found
}
```

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance80

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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

104d ago

### Community

Maintainers

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

---

Top Contributors

[![arowolodaniel](https://avatars.githubusercontent.com/u/21361612?v=4)](https://github.com/arowolodaniel "arowolodaniel (1 commits)")

---

Tags

laravelpaymentNigeriacheckoutzevpay

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

76518.2M118](/packages/laravel-mcp)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M122](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9742.3M121](/packages/roots-acorn)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4849.3k](/packages/sebdesign-laravel-viva-payments)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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