PHPackages                             jesuferanmi/php-monicredit - 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. [API Development](/categories/api)
4. /
5. jesuferanmi/php-monicredit

ActiveLibrary[API Development](/categories/api)

jesuferanmi/php-monicredit
==========================

Monicredit Rest API php library

20

Since Feb 2Compare

[ Source](https://github.com/feranmiemmanuel/php-monicredit)[ Packagist](https://packagist.org/packages/jesuferanmi/php-monicredit)[ RSS](/packages/jesuferanmi-php-monicredit/feed)WikiDiscussions Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

MONICREDIT PHP
==============

[](#monicredit-php)

 [![Github top language](https://camo.githubusercontent.com/aaa3be2dbf75ff2cf03135ec12342005ea25f3d3143be0c0552508add17482cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238)](https://camo.githubusercontent.com/aaa3be2dbf75ff2cf03135ec12342005ea25f3d3143be0c0552508add17482cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f746f702f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238) [![License](https://camo.githubusercontent.com/10773ae47f9e2823c2a33e5bbad961ced22b54dbf871bdf0720c2d9c897dd374/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238)](https://camo.githubusercontent.com/10773ae47f9e2823c2a33e5bbad961ced22b54dbf871bdf0720c2d9c897dd374/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238) [![Github issues](https://camo.githubusercontent.com/7b925f8c769812ae255ba4c9f06ac25ff55c20fd12eca5d34021c707b28ccb28/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238)](https://camo.githubusercontent.com/7b925f8c769812ae255ba4c9f06ac25ff55c20fd12eca5d34021c707b28ccb28/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238) [![Github forks](https://camo.githubusercontent.com/c883ed2582b07ab16a523b73d893ae955b32f4bca73a5ee5a5e2b2246717a6c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238)](https://camo.githubusercontent.com/c883ed2582b07ab16a523b73d893ae955b32f4bca73a5ee5a5e2b2246717a6c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f666572616e6d69656d6d616e75656c2f7068702d6d6f6e696372656469743f636f6c6f723d353642454238)

---

 [About](#dart-about) | [Requirements](#white_check_mark-requirements) | [Usage](#checkered_flag-usage) | [Contribution](#hammer-contribution) | [License](#memo-license) | [Author](https://github.com/feranmiemmanuel)

🎯 About
-------

[](#dart-about)

PHP Library for [Monicredit API](https://monicredit.gitbook.io/mc-api/)

✅ Requirements
--------------

[](#white_check_mark-requirements)

Before starting 🏁, you need to have [Git](https://git-scm.com) and [PHP 7+](https://php.net/) installed.

🏁 Usage
-------

[](#checkered_flag-usage)

```
# Installation
$ composer require jesuferanmi/php-monicredit
```

ENV Configuration
-----------------

[](#env-configuration)

Open your .env file and add your demo public key, live public key, demo private key, live private key, monicredit live and demo base url(You will find this in the api documentation. An example of the base url is: ) and monicredit environment('DEMO' or 'LIVE') like this:

```
MONICREDIT_DEMO_PUBLIC_KEY=""
MONICREDIT_DEMO_PRIVATE_KEY=""
MONICREDIT_LIVE_PUBLIC_KEY=""
MONICREDIT_LIVE_PRIVATE_KEY=""
MONICREDIT_ENVIRONMENT="DEMO"
MONICREDIT_DEMO_BASEURL=""
MONICREDIT_LIVE_BASEURL=""
```

*If you are using a hosting service like heroku, ensure to add the above details to your configuration variables.*

\#Usage

- Initiate Transaction

```
$monicredit = new Monicredit();

$customer = [
            'first_name' => 'Olasunkanmi',
            'last_name' => 'Feranmi',
            'email' => 'feranmiolasunkanmi91@gmail.com',
            'phone' => '0000000002'
        ];

$splitDetails = [
    'sub_account_code' => 'SB0000000',
    'fee_percentage' => 100,
    'fee_flat' => 0
];
$itemDetails = [
    "item" => 'Test Transaction',
    "revenue_head_code" => 'REV0000000',
    "unit_cost" => '300',
    "split_details" => array($splitDetails),
];

$payload = [
    'order_id' => rand(1000, 9000),
    'customer' => $customer,
    'items' => [$itemDetails],
    'feeBearer' => 'merchant'
];

$initiate = $monicredit->intiateTransaction($payload);
```

- Verify Transaction

```
$monicredit = new Monicredit();

$payload = ["transaction_id" => "ACX000000"];

$verify = $monicredit->verifyTransaction($payload);
```

- Get Transaction Info

```
$monicredit = new Monicredit();
$payload = "ACX000000";

$response = $monicredit->getInitiatedTransactionInfo();
```

🔨 Countribution
---------------

[](#hammer-countribution)

```
# fork and Clone the fork project
# Access the folder
$ cd monicredit-php

# Install dependencies
$ composer Install

# Create .env and update
$ cp .env.example .env

# Run test
$ vendor/bin/phpunit tests
```

📝 License
---------

[](#memo-license)

This project is under license from MIT. For more details, see the [LICENSE](LICENSE.md) file.

Made with ❤️ by [Emmanuel Jesuferanmi](https://github.com/feranmiemmanuel)

Todo:
-----

[](#todo)

- Update Readme with Usage

[Back to top](#top)

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e559e8fa4f3419c20fbd32d06f0285c30a86cf93f82091bfcc9fdfc7d04eb5a?d=identicon)[feranmiemmanuel](/maintainers/feranmiemmanuel)

### Embed Badge

![Health badge](/badges/jesuferanmi-php-monicredit/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)

PHPackages © 2026

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