PHPackages                             elmmac/elmmac-paystack-sdk - 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. elmmac/elmmac-paystack-sdk

ActiveLibrary[Payment Processing](/categories/payments)

elmmac/elmmac-paystack-sdk
==========================

Lightweight procedural Paystack SDK by ElmMac with init, callback and webhook helpers.

v1.0.0(4mo ago)00MITPHPPHP &gt;=7.4

Since Dec 15Pushed 4mo agoCompare

[ Source](https://github.com/ElmMac/elmmac-paystack-sdk)[ Packagist](https://packagist.org/packages/elmmac/elmmac-paystack-sdk)[ RSS](/packages/elmmac-elmmac-paystack-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

ElmMacPaystack – PHP Paystack SDK
=================================

[](#elmmacpaystack--php-paystack-sdk)

ElmMacPaystack is a lightweight PHP SDK for integrating Paystack into classic/procedural PHP projects. It handles initialize, callback and webhook flows, and logs full request/response payloads into a generic `elmmacpaystackpayments` table.

[![GitHub tag](https://camo.githubusercontent.com/30affcfbf378aedbf4d99d838eec029a6bd538f5763d097ebb00dd51c6185d69/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b3f6c6162656c3d76657273696f6e26736f72743d73656d766572)](https://github.com/ElmMac/elmmac-paystack-sdk/tags)[![GitHub license](https://camo.githubusercontent.com/e7c2b9273bc97927e5b9676653af869d84785a8b1a4ce3e4b7585e10d0a2290a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b)](https://camo.githubusercontent.com/e7c2b9273bc97927e5b9676653af869d84785a8b1a4ce3e4b7585e10d0a2290a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b)[![GitHub issues](https://camo.githubusercontent.com/36fae68ad4b18b192cccc5d74c30cb35676c99dd654007a718be9ba33dcec4ff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b)](https://camo.githubusercontent.com/36fae68ad4b18b192cccc5d74c30cb35676c99dd654007a718be9ba33dcec4ff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b)[![GitHub stars](https://camo.githubusercontent.com/d33f9917cd8a926e8dfb0cc8b0d1302471324f3be19628b7cd446040eb003bd9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b3f7374796c653d736f6369616c)](https://camo.githubusercontent.com/d33f9917cd8a926e8dfb0cc8b0d1302471324f3be19628b7cd446040eb003bd9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f456c6d4d61632f656c6d6d61632d706179737461636b2d73646b3f7374796c653d736f6369616c)

[![Packagist Version](https://camo.githubusercontent.com/ff4f48d8bcdea3eb78669902a469ddf5da9f347df6aa16b948e4b192aa86b51b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6d6d61632f656c6d6d61632d706179737461636b2d73646b2e737667)](https://packagist.org/packages/elmmac/elmmac-paystack-sdk)[![Packagist Downloads](https://camo.githubusercontent.com/c44563882958c61ffc87d82fd8cbff2022135121528b3d0baa4021ba84aa7424/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6d6d61632f656c6d6d61632d706179737461636b2d73646b2e737667)](https://packagist.org/packages/elmmac/elmmac-paystack-sdk)

Features
--------

[](#features)

- Simple PHP class wrapper around Paystack REST API
- Initialize payments with custom metadata
- Callback handler for success/failed payments
- Optional webhook listener with signature verification
- Request / response payload logging for debugging &amp; analytics

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

[](#requirements)

- PHP 7.4+ (or higher)
- cURL extension enabled
- MySQL / MariaDB (for the example payments table)
- A Paystack account with secret &amp; public keys

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

[](#installation)

1. Copy `src/ElmMacPayStack.php` into your project (for example into a `src/` or `lib/` folder).
2. Include the class in your bootstrap / init script:

```
require_once __DIR__ . '/src/ElmMacPayStack.php';

use ElmMacPaystack\ElmMacPayStack;

$paystack = new ElmMacPayStack('YOUR_PAYSTACK_SECRET_KEY');
```

3. Create the `elmmacpaystackpayments` table using the SQL provided in `database_table.sql` (or adapt it to your schema).

Quick start
-----------

[](#quick-start)

```
$payload = [
    'email'       => 'customer@example.com',
    'amount'      => 2500 * 100, // kobo
    'reference'   => uniqid('elmmac_', true),
    'callback_url'=> 'https://yourdomain.com/elmmacpaystack_callback.php',
    'metadata'    => ['user_id' => 123],
];

$response = $paystack->initialize($payload);

if ($response['status']) {
    header('Location: ' . $response['data']['authorization_url']);
    exit;
} else {
    // handle error
}
```

Then in your callback script you can:

```
// verify reference and update elmmacpaystackpayments
```

(See the example files in `elmmacpaystack/` for `init`, `callback`, and `webhook` handlers.)

Roadmap
-------

[](#roadmap)

- More helper methods (verify, refund, list transactions)
- Framework-agnostic middleware snippets (Laravel, Symfony, etc.)
- Better error handling &amp; typed responses

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

[](#contributing)

Pull requests and issues are welcome. Please open an issue first if you plan a bigger change so we can discuss direction.

License
-------

[](#license)

This project is open-source. You can use the MIT license below or choose a different license that fits your needs.

🙏 Credits
---------

[](#-credits)

Developed with 🚀 by **ElmMac Pty Ltd**
Maintained by @ElmMac - **Misael Cruise Mutege** — [WhatsApp: +27786411181](https://web.whatsapp.com/send?phone=27786411181) Durban, South Africa
Digital Dev | Hustler Mode: `ON 💼`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance79

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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

145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/821d4ffcbbdaf291a6f2d2bf1d66a2279e3f432684eeb5dae0543b67934aa884?d=identicon)[ElmMac](/maintainers/ElmMac)

---

Top Contributors

[![ElmMac](https://avatars.githubusercontent.com/u/78696778?v=4)](https://github.com/ElmMac "ElmMac (5 commits)")

### Embed Badge

![Health badge](/badges/elmmac-elmmac-paystack-sdk/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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