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(5mo ago)112↓50%4MITPHPPHP ^7.4|^8.0CI passing

Since Feb 4Pushed 1w ago1 watchersCompare

[ 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 3w ago

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

 [![Natcash Logo](https://camo.githubusercontent.com/76826f8e5276d0b54835d587471c9fb8b2db7f41be562c2b4c624edeed0c0278/68747470733a2f2f746573746d65726368616e747061792e6e6174636f6d2e636f6d2e68742f6d65726368616e742f5f6e6578742f7374617469632f696d616765732f6c6f676f2d31363839343038613834666530633436383331653761653264313966653034632e706e67)](https://camo.githubusercontent.com/76826f8e5276d0b54835d587471c9fb8b2db7f41be562c2b4c624edeed0c0278/68747470733a2f2f746573746d65726368616e747061792e6e6174636f6d2e636f6d2e68742f6d65726368616e742f5f6e6578742f7374617469632f696d616765732f6c6f676f2d31363839343038613834666530633436383331653761653264313966653034632e706e67)

 [ ![Build Status](https://github.com/midsonlajeanty/php-natcash-sdk/actions/workflows/tests.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
$config = new Config(PRIVATE_KEY, PARTNER_CODE, FUNCTION_CODE, USERNAME, PASSWORD, CALLBACK_URL);

// Payment Request
$payment = new PaymentRequest('ORDER-001', 10);

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

// Make Payment with payment request
$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;

// Natcash Merchant Credentials
$config = new Config(PRIVATE_KEY, PARTNER_CODE, FUNCTION_CODE, USERNAME, PASSWORD, CALLBACK_URL);

// 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);
}
```

Common conventions (MonCash &amp; NatCash)
------------------------------------------

[](#common-conventions-moncash--natcash)

The MonCash and NatCash SDKs share the same pattern. If you know one, you know the other:

StepClass / methodConfiguration`Config::from([...])`Instantiation`new ($config, $debug = true)`Request`PaymentRequest::from([...])`Payment`makePayment(PaymentRequest): PaymentResponse`Redirect`$response->getRedirect()`Details`getTransactionDetailsByOrderId($orderId): TransactionDetails`Result`$details->getOrderId()`, `getTransactionId()`, `getAmount()`, `getPayer()`, `isSuccessful()`NatCash-specific features: HMAC signatures (`verifyPayloadSignature()`), `getMsisdn()`, `skipPhoneInput`.

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

38

—

LowBetter than 83% of packages

Maintenance87

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community9

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

151d 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 (7 commits)")

---

Tags

natcashpaymentphpsdkpaymentnatcash

###  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

[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[shetabit/multipay

PHP Payment Gateway Integration Package

293361.0k4](/packages/shetabit-multipay)[bitpay/sdk

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

42361.9k4](/packages/bitpay-sdk)[ph7software/ph7cms

pH7Builder. Social Dating Web App Site Builder

1.0k1.6k](/packages/ph7software-ph7cms)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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