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

ActiveLibrary[Payment Processing](/categories/payments)

musheabdulhakim/paystack
========================

PHP &amp; Laravel package, that makes working with Paystack api a breeze.

2.0.4(9mo ago)345MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Dec 21Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/MusheAbdulHakim/Paystack)[ Packagist](https://packagist.org/packages/musheabdulhakim/paystack)[ Fund](https://paystack.com/pay/musheabdulhakim)[ GitHub Sponsors](https://github.com/musheabdulhakim)[ RSS](/packages/musheabdulhakim-paystack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (16)Versions (9)Used By (0)

[![Paystack client example](art/example.png)](art/example.png) [![GitHub Workflow Status (master)](https://github.com/MusheAbdulHakim/paystack/actions/workflows/tests.yml/badge.svg)](https://github.com/MusheAbdulHakim//actions) [![Total Downloads](https://camo.githubusercontent.com/f5d771507c4340c0808f210746470b0ae34fed04fe68d9aaaa2e0f5ba81a8191/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d75736865616264756c68616b696d2f706179737461636b)](https://packagist.org/packages/musheabdulhakim/paystack) [![Latest Version](https://camo.githubusercontent.com/8040108a88b718cb124cb6f8a64bd23571164c441e0003d83a5cc702a7ef464e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d75736865616264756c68616b696d2f706179737461636b)](https://packagist.org/packages/musheabdulhakim/paystack) [![License](https://camo.githubusercontent.com/b3fc75ea0cf90cd25b4dafbe276dc73f9c1cbedc4cd760f45d8eb1af62a35db2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d75736865616264756c68616b696d2f706179737461636b)](https://packagist.org/packages/musheabdulhakim/paystack)

---

Requirement
-----------

[](#requirement)

> **Requires [Composer](https://getcomposer.org/)****Requires [PHP 8.2+](https://php.net/releases/)**

Paystack PHP SDK
================

[](#paystack-php-sdk)

A robust, fluent and object-oriented PHP SDK for the [Paystack API](https://paystack.com/docs), designed for ease of use and extensibility.

---

Table of Contents
-----------------

[](#table-of-contents)

- [Introduction](#introduction)
- [Key Features](#key-features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [API Reference](#api-reference)
- [Extending the SDK](#extending-the-sdk)
- [Contributing](#contributing)
- [License](#license)

---

Introduction
------------

[](#introduction)

The SDK provides a comprehensive and intuitive way to interact with the [Paystack API](https://paystack.com/docs/api/). Designed with developer experience in mind, it offers a fluent, object-oriented interface to various Paystack endpoints, making payment integration seamless and efficient for your PHP applications.

This SDK supports a wide array of Paystack services, including:

- **Transactions:** Initialize, verify, list, fetch, charge authorizations, refunds, and more.
- **Customers:** Manage customer records, including creation, updates, and identity validation.
- **Transfers:** Facilitate single and bulk transfers to bank accounts and mobile money wallets.
- **Subscriptions:** Handle recurring payments by managing plans and customer subscriptions.
- **Dedicated Accounts (Virtual Accounts):** Create and manage unique bank accounts for customers.
- **Transaction Splits:** Automatically divide payments among multiple recipients.
- **Terminals:** Interact with physical Paystack POS devices.
- **Disputes:** Manage and resolve chargebacks effectively.
- **Miscellaneous:** Access general data like lists of banks, countries, and states.

---

Key Features
------------

[](#key-features)

- **Fluent API:** Enjoy a clean and readable codebase with chained method calls (e.g., `client()->transaction()->initialize(...)`).
- **Object-Oriented Design:** Paystack API endpoints are encapsulated into dedicated classes for better organization and maintainability.
- **PSR-18 HTTP Client Support:** Leverage any PSR-18 compatible HTTP client for flexible and robust request handling.
- **Strong Typing:** Benefits from PHP's type hints for enhanced code quality and improved IDE support.
- **Extensible Architecture:** Designed for easy extension, allowing you to add custom transporters or build new API modules.

---

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

[](#installation)

The easiest way to install the Paystack PHP SDK is via Composer:

```
composer require musheabdulhakim/paystack
```

---

Quick Start
-----------

[](#quick-start)

To get started, initialize the Paystack client with your secret key. You can then immediately begin interacting with any available Paystack API endpoint.

#### Simple Initialization

[](#simple-initialization)

```
