PHPackages                             revenuemonster/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. revenuemonster/sdk

ActiveLibrary[Payment Processing](/categories/payments)

revenuemonster/sdk
==================

A PHP SDK for RevenueMonster APIs

v2.0.5(1y ago)46.9k↓38.5%11[2 PRs](https://github.com/RevenueMonster/rm-php-sdk/pulls)1MITPHPPHP ^8.0

Since Feb 12Pushed 1y ago4 watchersCompare

[ Source](https://github.com/RevenueMonster/rm-php-sdk)[ Packagist](https://packagist.org/packages/revenuemonster/sdk)[ RSS](/packages/revenuemonster-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (20)Used By (1)

RevenueMonster PHP SDK
======================

[](#revenuemonster-php-sdk)

🪣 Minimum Requirements
----------------------

[](#-minimum-requirements)

- [php8](https://www.php.net/releases/8.0/en.php)
- [composer](https://getcomposer.org/) - A PHP package manager

🔨 Installation
--------------

[](#-installation)

```
composer require revenuemonster/sdk
```

📻 Legacy Support
----------------

[](#-legacy-support)

- If you using `php5.7`, please refer to branch [php5.7](https://github.com/RevenueMonster/rm-php-sdk/tree/php5.6)
- If you using `php7`, please refer to branch [php7](https://github.com/RevenueMonster/rm-php-sdk/tree/php7)

✨ Covered Functions
-------------------

[](#-covered-functions)

- Client Credentials (Authentication)
- Refresh Token (Authentication)
- Get Merchant Profile
- Get Merchant Subscriptions
- Get Stores
- Get Stores By ID
- Create Store
- Update Store
- Delete Store
- Get User Profile
- Payment (Transaction QR) - Create Transaction QRCode/URL
- Payment (Transaction QR) - Get Transaction QRCode/URL
- Payment (Transaction QR) - Get Transaction QRCode/URL By Code
- Payment (Transaction QR) - Get Transactions By Code
- Payment (Quick Pay) - Payment
- Payment (Quick Pay) - Refund
- Payment (Quick Pay) - Reverse
- Payment (Quick Pay) - Get All Payment Transactions
- Payment (Quick Pay) - Get All Payment Transaction By ID
- Payment (Quick Pay) - Daily Settlement Report
- Payment (Checkout) - Create Web/Mobile Payment (New UI support)
- Give Loyalty Point
- Get Loyalty Members
- Get Loyalty Member
- Get Loyalty Member Point History
- Issue Voucher
- Void Voucher
- Get Voucher By Code
- Get Voucher Batches
- Get Voucher Batch By Key
- Send Notification (Merchant)
- Send Notification (Store)
- Send Notification (User)
- eKYC - Mykad Prediction
- eKYC - Face Verification

📝 Examples
----------

[](#-examples)

```
require __DIR__.'/vendor/autoload.php';

use RevenueMonster\SDK\RevenueMonster;
use RevenueMonster\SDK\Exceptions\ApiException;
use RevenueMonster\SDK\Exceptions\ValidationException;
use RevenueMonster\SDK\Request\WebPayment;
use RevenueMonster\SDK\Request\QRPay;
use RevenueMonster\SDK\Request\QuickPay;

// Initialise sdk instance
$rm = new RevenueMonster([
  'clientId' => '5499912462549392881',
  'clientSecret' => 'pwMapjZzHljBALIGHxfGGXmiGLxjWbkT',
  'privateKey' => file_get_contents(__DIR__.'/private_key.pem'),
  'isSandbox' => false,
]);

// Get merchant profile
try {
  $response = $rm->merchant->profile();
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Get merchant subscriptions
try {
  $response = $rm->merchant->subscriptions();
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Get merchant's stores
try {
  $response = $rm->store->paginate(10);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Get transactions by QR Code
try {
  $qrCode = '732eb1e935983d274695f250dee9eb75';
  $response = $rm->payment->transactionsByQrCode($qrCode);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Get transactions
try {
  $response = $rm->payment->paginate(5);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Find transaction by transaction id
try {
  $transactionId = '100922222732432874823';
  $response = $rm->payment->find($transactionId);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// Find transaction by order id
try {
  $orderId = '1234';
  $response = $rm->payment->findByOrderId($orderId);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// create QR pay
try {
  $qrPay = new QRPay();
  $qrPay->currencyType = 'MYR';
  $qrPay->amount = 100;
  $qrPay->isPreFillAmount = true;
  $qrPay->order->title = '服务费';
  $qrPay->order->detail = 'testing';
  $qrPay->method = [];
  $qrPay->redirectUrl = 'https://shop.v1.mamic.asia/app/index.php?i=6&c=entry&m=ewei_shopv2&do=mobile&r=order.pay_rmwxpay.complete&openid=ot3NT0dxs4A8h4sVZm-p7q_MUTtQ&fromwechat=1';
  $qrPay->storeId = '1553067342153519097';
  $qrPay->type = 'DYNAMIC';
  $response = $rm->payment->qrPay($qrPay);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(Exception $e) {
  echo $e->getMessage();
}

// create Web payment
try {
  $wp = new WebPayment;
  $wp->order->id = '10020';
  $wp->order->title = 'Testing Web Payment';
  $wp->order->currencyType = 'MYR';
  $wp->order->amount = 100;
  $wp->order->detail = '';
  $wp->order->additionalData = '';
  $wp->storeId = "1553067342153519097";
  $wp->redirectUrl = 'https://google.com';
  $wp->notifyUrl = 'https://google.com';
  $wp->layoutVersion = 'v1';

  $response = $rm->payment->createWebPayment($wp);
  echo $response->checkoutId; // Checkout ID
  echo $response->url; // Payment gateway url
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(ValidationException $e) {
  var_dump($e->getMessage());
} catch(Exception $e) {
  echo $e->getMessage();
}

// create Quick pay
try {
  $qp = new QuickPay;
  $qp->authCode = '281011026026517778602435';
  $qp->order->id = '443';
  $qp->order->title = '【原味系列】 猫山王榴';
  $qp->order->currencyType = 'MYR';
  $qp->order->amount = 10;
  $qp->order->detail = '';
  $qp->order->additionalData = 'SH20190819100656262762';
  $qp->ipAddress = '8.8.8.8';
  $qp->storeId = "1553067342153519097";

  $response = $rm->payment->quickPay($qp);
} catch(ApiException $e) {
  echo "statusCode : {$e->getCode()}, errorCode : {$e->getErrorCode()}, errorMessage : {$e->getMessage()}";
} catch(ValidationException $e) {
  var_dump($e->getMessage());
} catch(Exception $e) {
  echo $e->getMessage();
}
```

eKYC Module
-----------

[](#ekyc-module)

The Revenue Monster eKYC (Electronic Know Your Customer) module provides features to complete the onboarding experience.

All the methods in this module accepts only the data portion in a base64 data url.

For example, you might have a base64 string as below, just send us the data part.

```
Format - data:[][;base64],

Example - data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE......

Data Portion - /9j/4AAQSkZJRgABAQE......

```

### eKYC MyKad

[](#ekyc-mykad)

This method will accept a mykad image and return a request ID to be used in the liveness SDK.

```
try {
  $mykad = new EkycMyKad();
  $mykad->base64Image = file_get_contents(__DIR__.'/mykad.txt');
  $response = $rm->ekyc->call($mykad);
} catch(Exception $e) {
  echo $e->getMessage();
}
```

### Face Verification

[](#face-verification)

This method will recognize and verify if the human face present on 2 images are the same person or not.

```
try {
  $image = file_get_contents(__DIR__.'/face.txt');
  $face = new VerifyFace();
  $face->base64Image1 = $image;    // image 1
  $face->base64Image2 = $image;    // image 2
  $response = $rm->ekyc->call($face);
} catch(Exception $e) {
  echo $e->getMessage();
}
```

### Get eKYC Result

[](#get-ekyc-result)

This method accepts the `ekycId` parameter returned from the Liveness SDK. It will return the complete eKYC result.

```
try {
  $request = new EkycGetResult();
  $request->id = "62201d52239b18052126e289";
  $ekycResult = $rm->ekyc->call($request);
} catch(Exception $e) {
  echo $e->getMessage();
}
```

### Get MyKad Result

[](#get-mykad-result)

This method accepts the `id` parameter returned from the `EkycMyKad` method, or `mykadRequestId` parameter from the `EkycGetResult` method. It will return the complete data recognized from the MyKad.

```
try {
  $request = new EkycGetMyKadResult();
  $request->id = $ekycResult->mykadRequestId;
  $response = $rm->ekyc->call($request);
} catch(Exception $e) {
  echo $e->getMessage();
}
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~146 days

Recently: every ~293 days

Total

15

Last Release

599d ago

Major Versions

v1.2.1 → v2.0.02021-07-11

PHP version history (2 changes)v1.0.0PHP &gt;=7.1.3

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f6bbff9d85029e043ba6855c69c01d714b36022d66c196421d5372aa9c99f9d?d=identicon)[apacventure](/maintainers/apacventure)

---

Top Contributors

[![si3nloong](https://avatars.githubusercontent.com/u/28108597?v=4)](https://github.com/si3nloong "si3nloong (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![rexlow](https://avatars.githubusercontent.com/u/7680796?v=4)](https://github.com/rexlow "rexlow (6 commits)")[![falconeri](https://avatars.githubusercontent.com/u/9047407?v=4)](https://github.com/falconeri "falconeri (4 commits)")[![icebay](https://avatars.githubusercontent.com/u/20467578?v=4)](https://github.com/icebay "icebay (1 commits)")[![DerrickTio-RevenueMonster](https://avatars.githubusercontent.com/u/180149759?v=4)](https://github.com/DerrickTio-RevenueMonster "DerrickTio-RevenueMonster (1 commits)")[![jk-gan](https://avatars.githubusercontent.com/u/7545747?v=4)](https://github.com/jk-gan "jk-gan (1 commits)")

---

Tags

aiapiv3paymentphprmsdkphprmrm-sdk

### Embed Badge

![Health badge](/badges/revenuemonster-sdk/health.svg)

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

###  Alternatives

[cartalyst/stripe-laravel

Laravel 11 integration for the Cartalyst Stripe package.

3382.6M9](/packages/cartalyst-stripe-laravel)[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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