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

ActiveLibrary[Payment Processing](/categories/payments)

hopekelldev/laravel-paystack
============================

Modern Paystack SDK for Laravel 13 and PHP 8.3+.

v1.0.0(1mo ago)013↓25%MITPHPPHP ^8.2

Since Apr 28Pushed 3w agoCompare

[ Source](https://github.com/HopekellDev/laravel-paystack)[ Packagist](https://packagist.org/packages/hopekelldev/laravel-paystack)[ RSS](/packages/hopekelldev-laravel-paystack/feed)WikiDiscussions main Synced 1w ago

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

💳 HopekellDev Laravel Paystack
==============================

[](#-hopekelldev-laravel-paystack)

[![Packagist Version](https://camo.githubusercontent.com/5beb7c588af6fb3cd500d8779e727d7926ecdb4df3fe47cca0348e5822e29d6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)](https://camo.githubusercontent.com/5beb7c588af6fb3cd500d8779e727d7926ecdb4df3fe47cca0348e5822e29d6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)[![PHP Version](https://camo.githubusercontent.com/c606943d9569e393a97b00d8f715505565b23231d5a595f951c502322cbfbede/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)](https://camo.githubusercontent.com/c606943d9569e393a97b00d8f715505565b23231d5a595f951c502322cbfbede/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)[![Laravel Version](https://camo.githubusercontent.com/93e2a73a6be4178312d2ac1dc894dab6632c2e920066fd0178100fe839695d02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332e782d726564)](https://camo.githubusercontent.com/93e2a73a6be4178312d2ac1dc894dab6632c2e920066fd0178100fe839695d02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332e782d726564)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Downloads](https://camo.githubusercontent.com/d38c6aa2165d590fe62a37ddd6ec901f21793d447a062730d8e6eee560a2e776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)](https://camo.githubusercontent.com/d38c6aa2165d590fe62a37ddd6ec901f21793d447a062730d8e6eee560a2e776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f70656b656c6c6465762f6c61726176656c2d706179737461636b)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3ee5561c1a2fcaa3dbfc77adb2fff5c1d15e1b8475d9295fd78366641db570a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d706179737461636b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/HopekellDev/laravel-paystack/?branch=main)[![Code Intelligence Status](https://camo.githubusercontent.com/b428e66910789aeb639ca7e0e942bd1ac802652675f2df6186c1e122a6764201/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d706179737461636b2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d61696e)](https://scrutinizer-ci.com/code-intelligence)[![Build Status](https://camo.githubusercontent.com/c7fbde3e7c8a8a96b33dbc1dce6182281e32901b87f6808cfb7319556db3b933/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d706179737461636b2f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/HopekellDev/laravel-paystack/build-status/main)

---

[![Laravel Paystack Banner](https://raw.githubusercontent.com/HopekellDev/laravel-paystack/main/assets/banner.png)](https://raw.githubusercontent.com/HopekellDev/laravel-paystack/main/assets/banner.png)

🚀 Introduction
--------------

[](#-introduction)

**HopekellDev Laravel Paystack** is a modern, lightweight, and fully customizable Paystack SDK built specifically for:

- ⚡ Laravel 13+
- 🧠 PHP 8.3+
- 🧩 Clean architecture
- 🔥 Static method access
- 🛡 Simple exception handling
- 📦 Easy Laravel installation

Built for developers who want a modern Paystack integration without depending on outdated Laravel Paystack libraries.

---

✨ Features
----------

[](#-features)

- ✅ Laravel 13 support
- ✅ PHP 8.3+ support
- ✅ Static API style
- ✅ Service-based structure
- ✅ Centralized HTTP client
- ✅ Standardized API responses
- ✅ Built-in exception handling
- ✅ Laravel package auto-discovery
- ✅ Easy to extend with more Paystack endpoints

---

📦 Installation
--------------

[](#-installation)

```
composer require hopekelldev/laravel-paystack
```

Publish the config file:

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

---

⚙️ Configuration
----------------

[](#️-configuration)

Add your Paystack credentials to `.env`:

```
PAYSTACK_PUBLIC_KEY=pk_test_xxxxxx
PAYSTACK_SECRET_KEY=sk_test_xxxxxx
PAYSTACK_BASE_URL=https://api.paystack.co
PAYSTACK_TIMEOUT=30
```

---

🧪 Quick Usage
-------------

[](#-quick-usage)

```
use HopekellDev\Paystack\Paystack;

$response = Paystack::transactions()->initialize([
    'email' => 'user@email.com',
    'amount' => 500000,
    'callback_url' => route('payment.callback'),
]);

return redirect($response['data']['authorization_url']);
```

---

📘 Basic Documentation
---------------------

[](#-basic-documentation)

### Transactions

[](#transactions)

#### Initialize Transaction

[](#initialize-transaction)

```
Paystack::transactions()->initialize([
    'email' => 'user@email.com',
    'amount' => 500000,
]);
```

#### Verify Transaction

[](#verify-transaction)

```
Paystack::transactions()->verify($reference);
```

#### List Transactions

[](#list-transactions)

```
Paystack::transactions()->list([
    'perPage' => 50,
]);
```

#### Fetch Transaction

[](#fetch-transaction)

```
Paystack::transactions()->fetch($transactionId);
```

---

### Plans

[](#plans)

#### Create Plan

[](#create-plan)

```
Paystack::plans()->create([
    'name' => 'Premium Plan',
    'amount' => 100000,
    'interval' => 'monthly',
]);
```

#### List Plans

[](#list-plans)

```
Paystack::plans()->list();
```

#### Fetch Plan

[](#fetch-plan)

```
Paystack::plans()->fetch($planCode);
```

#### Update Plan

[](#update-plan)

```
Paystack::plans()->update($planCode, [
    'name' => 'Updated Premium Plan',
]);
```

---

### Customers

[](#customers)

#### Create Customer

[](#create-customer)

```
Paystack::customers()->create([
    'email' => 'user@email.com',
    'first_name' => 'John',
    'last_name' => 'Doe',
]);
```

#### Fetch Customer

[](#fetch-customer)

```
Paystack::customers()->fetch($emailOrCustomerCode);
```

#### Update Customer

[](#update-customer)

```
Paystack::customers()->update($customerCode, [
    'first_name' => 'Updated Name',
]);
```

---

### Dedicated Virtual Accounts

[](#dedicated-virtual-accounts)

#### Create Dedicated Virtual Account

[](#create-dedicated-virtual-account)

```
Paystack::dedicatedVirtualAccounts()->create([
    'customer' => $customerCode,
    'preferred_bank' => 'wema-bank',
]);
```

#### Assign Dedicated Virtual Account

[](#assign-dedicated-virtual-account)

```
Paystack::dedicatedVirtualAccounts()->assign([
    'email' => 'user@email.com',
    'first_name' => 'John',
    'last_name' => 'Doe',
    'phone' => '08000000000',
    'preferred_bank' => 'wema-bank',
    'country' => 'NG',
]);
```

#### List Dedicated Virtual Accounts

[](#list-dedicated-virtual-accounts)

```
Paystack::dedicatedVirtualAccounts()->list();
```

#### Fetch Dedicated Virtual Account

[](#fetch-dedicated-virtual-account)

```
Paystack::dedicatedVirtualAccounts()->fetch($dedicatedAccountId);
```

---

📚 Covered Endpoints
-------------------

[](#-covered-endpoints)

### ✅ Transactions

[](#-transactions)

- Initialize Transaction
- Verify Transaction
- List Transactions
- Fetch Transaction
- Charge Authorization
- Transaction Totals
- Export Transactions

### ✅ Plans

[](#-plans)

- Create Plan
- List Plans
- Fetch Plan
- Update Plan

### ✅ Customers

[](#-customers)

- Create Customer
- List Customers
- Fetch Customer
- Update Customer
- Validate Customer
- Set Risk Action

### ✅ Dedicated Virtual Accounts

[](#-dedicated-virtual-accounts)

- Create Dedicated Account
- Assign Dedicated Account
- List Dedicated Accounts
- Fetch Dedicated Account
- Deactivate Dedicated Account
- Split Dedicated Account
- Remove Split
- List Available Providers

---

⚠️ Error Handling
-----------------

[](#️-error-handling)

All failed Paystack API requests throw:

```
HopekellDev\Paystack\Exceptions\PaystackException
```

Example:

```
use HopekellDev\Paystack\Exceptions\PaystackException;
use HopekellDev\Paystack\Paystack;

try {
    $response = Paystack::transactions()->verify($reference);
} catch (PaystackException $e) {
    return $e->getMessage();
}
```

---

🧱 Package Architecture
----------------------

[](#-package-architecture)

```
Paystack
├── Services
│   ├── Transactions
│   ├── Plans
│   ├── Customers
│   └── DedicatedVirtualAccounts
├── Helpers
│   ├── Http Client
│   └── Response Formatter
└── Exceptions
```

---

🗂 Packaage Folder Structure
---------------------------

[](#-packaage-folder-structure)

```
src/
├── Paystack.php
├── PaystackServiceProvider.php
├── Exceptions/
│   └── PaystackException.php
├── Helpers/
│   ├── ApiResponse.php
│   └── HasHttpClient.php
└── Services/
    ├── Transactions.php
    ├── Plans.php
    ├── Customers.php
    └── DedicatedVirtualAccounts.php
```

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome.

You can help by:

- Adding more Paystack endpoints
- Improving documentation
- Writing tests
- Improving error handling
- Adding Laravel helpers
- Improving developer experience

### How to contribute

[](#how-to-contribute)

1. Fork the repository
2. Create a new branch
3. Commit your changes
4. Push to your branch
5. Open a pull request

---

🔥 Roadmap
---------

[](#-roadmap)

- Subscriptions API
- Transfers API
- Transfer Recipients API
- Settlements API
- Refunds API
- Disputes API
- Webhook signature verification
- Laravel webhook controller helper
- Retry logic
- Logging support
- Pest test suite
- GitHub Actions CI

---

📢 Call for Collaboration
------------------------

[](#-call-for-collaboration)

This library is actively open for collaboration and improvement.

If you are a Laravel developer, fintech builder, open-source contributor, or Paystack user, your support is welcome.

Help make this package better by submitting issues, pull requests, endpoint updates, and documentation improvements.

---

🛡 License
---------

[](#-license)

This package is open-sourced software licensed under the MIT License.

---

👨‍💻 Author
----------

[](#‍-author)

**HopekellDev**

Building scalable fintech, SaaS, and backend systems.

---

⭐ Support
---------

[](#-support)

If this package helps you, please support it by:

- Starring the repository
- Sharing it with Laravel developers
- Reporting bugs
- Suggesting improvements
- Contributing code

---

📬 Contact
---------

[](#-contact)

For support, collaboration, or questions:

- GitHub Issues
- Email:

---

> Built for Laravel developers who need a clean, modern, and extendable Paystack SDK.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance93

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46373141?v=4)[Ezenwa Hopekell](/maintainers/HopekellDev)[@HopekellDev](https://github.com/HopekellDev)

---

Top Contributors

[![HopekellDev](https://avatars.githubusercontent.com/u/46373141?v=4)](https://github.com/HopekellDev "HopekellDev (42 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)[yenepay/php-sdk

YenePay SDK for PHP

112.7k](/packages/yenepay-php-sdk)

PHPackages © 2026

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