PHPackages                             mcpayment/mcp-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. [Payment Processing](/categories/payments)
4. /
5. mcpayment/mcp-php

ActiveLibrary[Payment Processing](/categories/payments)

mcpayment/mcp-php
=================

Official PHP package for MCPayment API

v0.1.0-beta.2(3y ago)062MITPHPPHP &gt;=7.2.0

Since Oct 3Pushed 3y ago1 watchersCompare

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

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

MCP-PHP
=======

[](#mcp-php)

This is the Official PHP package for MCPayment API. For more documentation available at .

1. Installation
===============

[](#1-installation)

Your application should meet minimum version of **PHP ≥ 7.2**.

> ‼️ This package not ready yet for production use ‼️

If you are using [Composer](https://getcomposer.org), you can install via composer CLI:

```
composer require mcpayment/mcp-php

```

**or**

add this require line to your `composer.json` file:

```
{
    "require": {
        "mcpayment/mcp-php": "1.*"
    }
}
```

and run `composer install` on your terminal.

2. How to Use
=============

[](#2-how-to-use)

General Settings
----------------

[](#general-settings)

See `.env.example` for your env settings reference on your app. Then set it up for your headers's requests as below:

```
use MCPhp\Mcp;

Mcp::setApiEnv(MCP_ENV);
Mcp::setMerchantId(MCP_MERCHANT_INDEX);
Mcp::setSecretUnboundId(MCP_SECRET_UNBOUND_ID);
Mcp::setHashKey(MCP_HASH_KEY);
Mcp::setHeaders($externalId, $orderId);

```

Generate Transaction Link
-------------------------

[](#generate-transaction-link)

Generate the transaction using **CreateTransaction** trait, this will return an object.Please refer to this [Payment Page docs](https://developer.mcpayment.id/#e129bd57-6120-4a24-852f-ab2fb5bbfeef). Simply add this to your code:

```
use MCPhp\CreateTransaction;

CreateTransaction::generateLink($headers, $body));

```

Virtual Account
---------------

[](#virtual-account)

You can make `OPEN` and `PARTIAL` transaction's mode of virtual account with this. Simply add this to your code:

```
use MCPhp\VirtualAccounts;

```

### Create

[](#create)

```
VirtualAccounts::create($headers, $body));

```

### Payment

[](#payment)

```
VirtualAccounts::pay($params);

```

### Cancel

[](#cancel)

```
VirtualAccounts::cancel($headers, $params);

```

### Inquiry

[](#inquiry)

```
VirtualAccounts::inquiry($headers, $params);

```

3. Example
==========

[](#3-example)

You can find the example at the [examples](https://github.com/mcpayment/mcp-php/tree/main/examples) folder

> See [documentation](https://developer.mcpayment.id) for details about `headers` and `body` requests.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity29

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

Every ~0 days

Total

2

Last Release

1320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c312cb9eea8ff00b7bd508f0a1e369ff1470a3996173934a2bf15a24471ae21?d=identicon)[mcp-developer](/maintainers/mcp-developer)

---

Top Contributors

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

---

Tags

credit-cardewalletmcpaymentmcppayment-idpaymentpayment-gatewayphpvirtual-accountmcpayment

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mcpayment-mcp-php/health.svg)

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

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

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

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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