PHPackages                             myckhel/laravel-paystack - 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. myckhel/laravel-paystack

Abandoned → [binkode/laravel-paystack](/?search=binkode%2Flaravel-paystack)Package[Payment Processing](/categories/payments)

myckhel/laravel-paystack
========================

A description for laravel-paystack.

v1.5.0(2mo ago)10837↓50%1[1 issues](https://github.com/binkode/laravel-paystack/issues)MITPHPCI passing

Since May 14Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/binkode/laravel-paystack)[ Packagist](https://packagist.org/packages/myckhel/laravel-paystack)[ Fund](https://ko-fi.com/myckhel)[ RSS](/packages/myckhel-laravel-paystack/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (17)Used By (0)

Laravel Paystack
================

[](#laravel-paystack)

Laravel wrapper for the [Paystack API](https://paystack.com/docs/), built for direct use in controllers, services, and queued jobs.

[![Latest Version on Packagist](https://camo.githubusercontent.com/bcb4247f04342435697d2511e8dde6d5007044fe1e88f768d9c44616c9bab02d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62696e6b6f64652f6c61726176656c2d706179737461636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binkode/laravel-paystack)[![Total Downloads](https://camo.githubusercontent.com/4879665f745fc751e5e5252906d225d9c6e00cf740f45ecdb35e97b61a2f3410/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62696e6b6f64652f6c61726176656c2d706179737461636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binkode/laravel-paystack)[![Tests](https://camo.githubusercontent.com/241d1a39264253236fbdd926b6cac32f412d2584ed587a8798b0eea2b642b479/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f62696e6b6f64652f6c61726176656c2d706179737461636b2f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/binkode/laravel-paystack/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/a24e8dbbe3a4af3bbad34b6588513c55316b4289208e26f43c33231d7e2fd85b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f62696e6b6f64652f6c61726176656c2d706179737461636b2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Laravel](https://camo.githubusercontent.com/b21bc2003aa619c22eebfa5bcd69dca1cc7effe70502ebde76cd4801f3c84f9e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253230253743253230313125323025374325323031322d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/binkode/laravel-paystack)

Features
--------

[](#features)

- Covers a broad set of Paystack endpoints (transactions, customers, transfers, plans, subscriptions, disputes, refunds, and more).
- Optional built-in HTTP routes for quick API proxying from your Laravel app.
- Built-in webhook route with signature validation and event dispatching.
- Compatible with Laravel `10`, `11`, and `12`.

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

[](#installation)

```
composer require binkode/laravel-paystack
```

Laravel package auto-discovery will register the service provider and facade alias automatically.

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

[](#configuration)

Publish config:

```
php artisan vendor:publish --provider="Binkode\Paystack\PaystackServiceProvider"
```

Set your credentials in `.env`:

```
PAYSTACK_PUBLIC_KEY=pk_test_xxx
PAYSTACK_SECRET_KEY=sk_test_xxx
PAYSTACK_URL=https://api.paystack.co
PAYSTACK_MERCHANT_EMAIL=merchant@example.com
```

Default config (`config/paystack.php`):

```
return [
    "public_key" => env("PAYSTACK_PUBLIC_KEY"),
    "secret_key" => env("PAYSTACK_SECRET_KEY"),
    "url" => env("PAYSTACK_URL", "https://api.paystack.co"),
    "merchant_email" => env("PAYSTACK_MERCHANT_EMAIL"),
    "route" => [
        "middleware" => ["paystack_route_disabled", "api"],
        "prefix" => "api",
        "hook_middleware" => ["validate_paystack_hook", "api"],
    ],
];
```

Quick Usage
-----------

[](#quick-usage)

Call support classes directly:

```
use Binkode\Paystack\Support\Transaction;
use Binkode\Paystack\Support\Customer;

$init = Transaction::initialize([
    "email" => "customer@example.com",
    "amount" => 500000, // amount in kobo
]);

$verify = Transaction::verify("reference_here");

$customer = Customer::create([
    "email" => "customer@example.com",
    "first_name" => "Jane",
    "last_name" => "Doe",
]);
```

Available Support Classes
-------------------------

[](#available-support-classes)

- `ApplePay`
- `BulkCharge`
- `Charge`
- `ControlPanel`
- `Customer`
- `DedicatedVirtualAccount`
- `Dispute`
- `Invoice`
- `Miscellaneous`
- `Page`
- `Plan`
- `Product`
- `Recipient`
- `Refund`
- `Settlement`
- `Split`
- `SubAccount`
- `Subscription`
- `Transaction`
- `Transfer`
- `TransferControl`
- `Verification`

See class methods in `src/Support/*`.

Built-In Routes
---------------

[](#built-in-routes)

The package registers route definitions from `src/routes.php`. By default, API routes are disabled through the `paystack_route_disabled` middleware.

To enable built-in routes, remove `paystack_route_disabled` from `paystack.route.middleware` in `config/paystack.php`.

Default route prefix is `api`, so endpoints resolve like:

- `POST /api/transaction/initialize`
- `GET /api/transaction/verify/{reference}`
- `POST /api/customer`

Webhooks
--------

[](#webhooks)

Webhook endpoint:

- `POST /api/hooks` (route is registered as `Route::any`, but Paystack should call it with `POST`)

Incoming webhook requests are validated by the `validate_paystack_hook` middleware using your `PAYSTACK_SECRET_KEY`.

Each valid incoming webhook dispatches the `Binkode\Paystack\Events\Hook` event.

Create a listener:

```
php artisan make:listener PaystackWebhookListener --event=Binkode\\Paystack\\Events\\Hook
```

Example listener:

```
use Binkode\Paystack\Events\Hook;
use Illuminate\Support\Facades\Log;

class PaystackWebhookListener
{
    public function handle(Hook $event): void
    {
        Log::info("Paystack webhook received", [
            "event" => $event->event["event"] ?? null,
            "payload" => $event->event,
        ]);
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Useful Links
------------

[](#useful-links)

- [Paystack API Docs](https://paystack.com/docs/)
- [Postman Collection](https://www.postman.com/myckhel/workspace/myckhel/collection/9558301-024596ae-713a-4890-b12b-6842195ef802?action=share&creator=9558301)
- [Package Demo App](https://github.com/binkode/paystack-demo)

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

[](#contributing)

Please read [CONTRIBUTING.md](CONTRIBUTING.md).

Security
--------

[](#security)

If you discover any security-related issues, email `binkode1@hotmail.com` instead of opening a public issue.

License
-------

[](#license)

Released under the [MIT License](LICENSE.md).

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance82

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Recently: every ~256 days

Total

16

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f0d24f84c6d2007b34e6b49f62315c6ac103ce5b29817a9053535f10a8e7d6?d=identicon)[myckhel](/maintainers/myckhel)

---

Top Contributors

[![myckhel](https://avatars.githubusercontent.com/u/34090541?v=4)](https://github.com/myckhel "myckhel (61 commits)")

---

Tags

laravel-paystacklaravel-paystack-subscriptionpaystackpaystack-apipaystack-payment-gatewaylaravel

### Embed Badge

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

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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