PHPackages                             chapdel/notchpay-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. chapdel/notchpay-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

chapdel/notchpay-php
====================

Notch Pay PHP Wrapper.

1.1(2y ago)04MITPHPPHP ^7.4|^8.0|^8.1|^8.2

Since Jan 18Pushed 2y agoCompare

[ Source](https://github.com/chapdel/notchpay-php)[ Packagist](https://packagist.org/packages/chapdel/notchpay-php)[ Docs](https://github.com/notchpay/notchpay-php)[ RSS](/packages/chapdel-notchpay-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

Introduction
============

[](#introduction)

A PHP API wrapper for [Notch Pay](https://notchpay.co/).

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

[](#installation)

You can install the package via composer:

```
composer require notchpay/notchpay-php
```

Usage
-----

[](#usage)

Do a redirect to the authorization URL received from calling the payments/initialize endpoint. This URL is valid for one time use, so ensure that you generate a new URL per payment.

When the payment is successful, we will call your callback URL (as setup in your dashboard or while initializing the transaction) and return the reference sent in the first step as a query parameter.

If you use a test public key, we will call your test callback url, otherwise, we'll call your live callback url.

### 0. Prerequisites

[](#0-prerequisites)

Confirm that your server can conclude a TLSv1.2 connection to Notch Pay's servers. Most up-to-date software have this capability. Contact your service provider for guidance if you have any SSL errors. *Don't disable SSL peer verification!*

### 1. Prepare your parameters

[](#1-prepare-your-parameters)

`email`, `amount` and `currency` are the most common compulsory parameters. Do send a unique email per customer. The amount accept numeric value value. The currency accept currency ISO 3166. For instance, to accept `For US Dollar`, please send `USD` as the currency.

### 2. Initialize a onetime payments

[](#2-initialize-a-onetime-payments)

Initialize a payment by calling our API.

```
use NotchPay\NotchPay;
use NotchPay\Payment;

NotchPay::setApiKey('sk_1234abcd');

try {
    $tranx = Payment::initialize([
        'amount'=>$amount,       // according to currency format
        'email'=>$email,         // unique to customers
        'currency'=>$currency,         // currency iso code
        'callback'=>$callback,         // optional callback url
        'reference'=>$reference, // unique to transactions
    ]);
} catch(\NotchPay\Exceptions\ApiException $e){
    print_r($e->errors);
    die($e->getMessage());
}
// redirect to page so User can pay
header('Location: ' . $tranx->authorization_url);
```

When the user enters their payment details, NotchPay will validate and charge the card. It will do all the below:

Send a payment.complete event to your Webhook URL set at:

If receipts are not turned off, an HTML receipt will be sent to the customer's email.

### 3. Verify Transaction

[](#3-verify-transaction)

After we redirect to your callback, please verify the transaction before giving value.

```
    $reference = isset($_GET['reference']) ? $_GET['reference'] : '';
    if(!$reference){
      die('No reference supplied');
    }

    // initiate the Library's NotchPay Object
    NotchPay::setApiKey('sk_1234abcd');

    try {
    $tranx = Payment::verify($reference);

    if ($tranx->transaction->status === 'complete') {
      // transaction was successful...
      // please check other things like whether you already gave value for this ref
      // if the email matches the customer who owns the product etc
      // Give value
    }
} catch(\NotchPay\Exceptions\ApiException $e){
    print_r($e->errors);
    die($e->getMessage());
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

849d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20987014?v=4)[Chapdel KAMGA](/maintainers/chapdel)[@chapdel](https://github.com/chapdel)

---

Top Contributors

[![chapdel](https://avatars.githubusercontent.com/u/20987014?v=4)](https://github.com/chapdel "chapdel (8 commits)")

---

Tags

apicurlverifypayment processingpaymentgatewaydisabletransactioncustomerenableOrange Moneymtn momonotchpayaccept money

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chapdel-notchpay-php/health.svg)

```
[![Health](https://phpackages.com/badges/chapdel-notchpay-php/health.svg)](https://phpackages.com/packages/chapdel-notchpay-php)
```

###  Alternatives

[yabacon/paystack-php

Helps make your Paystack API calls giving a stdClass object.

117429.0k11](/packages/yabacon-paystack-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[nadar/aspsms

Simple to use sms sending class for the aspsms.com gateway.

1049.2k2](/packages/nadar-aspsms)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)

PHPackages © 2026

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