PHPackages                             midsonlajeanty/php-natcash-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. midsonlajeanty/php-natcash-sdk

ActiveLibrary[Payment Processing](/categories/payments)

midsonlajeanty/php-natcash-sdk
==============================

Minimum SDK to process payment with Natcom Natcash Payment Gateway

v1.0.0(3mo ago)05↓80%MITPHPPHP ^7.4|^8.0CI passing

Since Feb 4Pushed 3mo agoCompare

[ Source](https://github.com/midsonlajeanty/php-natcash-sdk)[ Packagist](https://packagist.org/packages/midsonlajeanty/php-natcash-sdk)[ Docs](https://github.com/midsonlajeanty/php-natcash-sdk)[ RSS](/packages/midsonlajeanty-php-natcash-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

 [![Natcash Logo](https://camo.githubusercontent.com/74a09189f10e7a5ca10ba0d9144ecf67cf718e3a3ea9e3f017f84c296121e3aa/68747470733a2f2f77617265686f7573652e63616e616c2d6f766572736561732e636f6d2f636f6e74656e742f303030312f34342f306163353663383933663866633934336636623365353566323336613036393761373665663735302e706e67)](https://camo.githubusercontent.com/74a09189f10e7a5ca10ba0d9144ecf67cf718e3a3ea9e3f017f84c296121e3aa/68747470733a2f2f77617265686f7573652e63616e616c2d6f766572736561732e636f6d2f636f6e74656e742f303030312f34342f306163353663383933663866633934336636623365353566323336613036393761373665663735302e706e67)

 [ ![Build Status](https://github.com/midsonlajeanty/php-natcash-sdk/actions/workflows/tests%20.yml/badge.svg) ](https://github.com/midsonlajeanty/php-natcash-sdk/actions) [ ![Total Downloads](https://camo.githubusercontent.com/e684c73933c299c524a9617ee1cd57adca9fec0c500fe690fea5f149fa3550d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6964736f6e6c616a65616e74792f7068702d6e6174636173682d73646b) ](https://packagist.org/packages/midsonlajeanty/php-natcash-sdk) [ ![Latest Stable Version](https://camo.githubusercontent.com/adca46f399fa862e86b87bb249e14373b47dc6436206c83b4662f4c268eb118d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6964736f6e6c616a65616e74792f7068702d6e6174636173682d73646b) ](https://packagist.org/packages/midsonlajeanty/php-natcash-sdk) [ ![License](https://camo.githubusercontent.com/c301ec1aeb5319acd5361e6b86f5c8eed9537407fb41b0a857d4643ae2991d6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6964736f6e6c616a65616e74792f7068702d6e6174636173682d73646b) ](https://packagist.org/packages/midsonlajeanty/php-natcash-sdk)

Minimum SDK to process payment with Natcom Natcash Payment Gateway

Features
--------

[](#features)

- Create Payment Transaction and get gateway URL (Natcash Checkout)
- Get Transaction Details by Order ID

Getting started
---------------

[](#getting-started)

```
composer require midsonlajeanty/php-natcash-sdk

```

Usage
-----

[](#usage)

### Init Payment and get Payment URL (Natcash Checkout)

[](#init-payment-and-get-payment-url--natcash-checkout)

```
use Mds\Natcash\Config;
use Mds\Natcash\Natcash;
use Mds\Natcash\PaymentRequest;

// Natcash Merchant Credentials
$configArray = [
    'privateKey' => PRIVATE_KEY,
    'partnerCode' => PARTNER_CODE,
    'functionCode' => FUNCTION_CODE,
    'username' => USERNAME,
    'password' => PASSWORD,
    'callbackUrl' => CALLBACK_URL,
];

$config = Config::fromArray($configArray);

// Payment Request
$paymentArray = [
    'orderNumber' => 'ORDER-001',
    'amount' => 10,
];
$payment = PaymentRequest::fromArray($paymentArray);

// Init SDK with config
$natcash = new Natcash($config, DEBUG);

// Make Payment with payment request and Amount
$response = $natcash->makePayment($payment);

// Get Payment URL  (Natcash Checkout)
$response->getRedirect();
```

### Get Transaction Details by Order ID

[](#get-transaction-details-by-order-id)

```
use Mds\Natcash\Config;
use Mds\Natcash\Natcash;
use Mds\Natcash\PaymentRequest;

// Natcash Merchant Credentials
$configArray = [
    'privateKey' => PRIVATE_KEY,
    'partnerCode' => PARTNER_CODE,
    'functionCode' => FUNCTION_CODE,
    'username' => USERNAME,
    'password' => PASSWORD,
    'callbackUrl' => CALLBACK_URL,
];

$config = Config::fromArray($configArray);

// Init SDK with config
$natcash = new Natcash($config, DEBUG);

// Verify Webhook Payload Signature
$isValid = $natcash->verifyPayloadSignature('WEBHOOK_ORDER_NUMBER', 'WEBHOOK_CODE', 'WEBHOOK_SIGNATURE');

if ($isValid) {
    print_r("Signature is valid." . PHP_EOL . PHP_EOL);

    // Get Payment Details with OrderId provided by your app.
    $details = $natcash->getTransactionDetailsByOrderId($orderNumber);

} else {
    print_r("Signature is invalid." . PHP_EOL);
}
```

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

[](#contributing)

You have a lot of options to contribute to this project ! You can :

- [Fork](https://github.com/midsonlajeanty/php-natcash-sdk) on Github
- [Submit](https://github.com/midsonlajeanty/php-natcash-sdk/issues) a bug report.
- [Donate](https://www.buymeacoffee.com/midsonlajeanty) to the Developper

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance80

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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

104d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63215721?v=4)[Louis Midson Lajeanty](/maintainers/midsonlajeanty)[@midsonlajeanty](https://github.com/midsonlajeanty)

---

Top Contributors

[![midsonlajeanty](https://avatars.githubusercontent.com/u/63215721?v=4)](https://github.com/midsonlajeanty "midsonlajeanty (1 commits)")

---

Tags

paymentnatcash

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/midsonlajeanty-php-natcash-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/midsonlajeanty-php-natcash-sdk/health.svg)](https://phpackages.com/packages/midsonlajeanty-php-natcash-sdk)
```

###  Alternatives

[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omnipay/payfast

PayFast driver for the Omnipay payment processing library

24626.9k3](/packages/omnipay-payfast)[commerceguys/authnet

PHP SDK for Authorize.Net API, using Guzzle.

20462.4k](/packages/commerceguys-authnet)[flutterwavedev/flutterwave-v3

A simple SDK for integrating to Flutterwave Payment

24174.1k6](/packages/flutterwavedev-flutterwave-v3)

PHPackages © 2026

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