PHPackages                             payme-quantum/payment-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. payme-quantum/payment-sdk

ActiveLibrary[Payment Processing](/categories/payments)

payme-quantum/payment-sdk
=========================

PAYME Payment Integration Library

0.0.3(1y ago)024MITPHPPHP ^7.4 || ^8.0

Since Sep 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/techpeexit/php-payme-sdk)[ Packagist](https://packagist.org/packages/payme-quantum/payment-sdk)[ RSS](/packages/payme-quantum-payment-sdk/feed)WikiDiscussions main Synced 1mo ago

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

PAYME Payment Integration
=========================

[](#payme-payment-integration)

This project provides a PHP-based integration with the PayMe API for processing payments through multiple providers. It supports both sandbox and production environments, handles real-time payment status callbacks, and includes a fallback polling mechanism.

Features
--------

[](#features)

- Seamless Environment Switching: Easily switch between sandbox and production environments via environment variables.
- Real-Time Callbacks: Supports providerCallbackHost to receive real-time payment status updates.
- Polling Mechanism: A fallback polling mechanism for cases where callback notifications fail to get the final status of transactions.
- API User and Key Management: Automatically creates API users and keys in the sandbox environment after the onboarding process completed in the admin panel.
- Unique Payment References: Generates unique payment reference IDs using uuid\_v4() for each transaction.
- Unique Payment Types: Support many payment types related to the user experience:
- Simple Payment: This is when one user does one payment at a time.
- Partial Payment: This is to allow merchants to accept if a customer will do multiple payments for a specific product or service.
- Group Payment: This is when many customers are doing the same payment.

Prerequisites
-------------

[](#prerequisites)

PHP (&gt;= 7.4) Composer PAYME API access (for both sandbox and production environments)

Getting Started
---------------

[](#getting-started)

### 1. Install the package in your project

[](#1-install-the-package-in-your-project)

```
composer require payme-quantum/payment-sdk
```

### 2. Environment Configuration

[](#2-environment-configuration)

Create a .env file in your project root and add the following variables: text

General Configuration
=====================

[](#general-configuration)

```
SUBSCRIPTION_KEY_SANDBOX=
CALLBACK_HOST_SANDBOX=
PAYME_CREDENTIAL_EMAIL=
PAYME_CREDENTIAL_PASSWORD=

SUBSCRIPTION_KEY_SANDBOX=
CALLBACK_HOST_SANDBOX=
PAYME_CREDENTIAL_EMAIL=
PAYME_CREDENTIAL_PASSWORD=
```

Sandbox Configuration
=====================

[](#sandbox-configuration)

SUBSCRIPTION\_KEY\_SANDBOX=&lt;your\_sandbox\_subscription\_key&gt; CALLBACK\_HOST\_SANDBOX=&lt;your\_sandbox\_callback\_url&gt; PAYME\_CREDENTIAL\_EMAIL=&lt;your\_sandbox\_email&gt; PAYME\_CREDENTIAL\_PASSWORD=&lt;your\_sandbox\_password&gt;

Production Configuration
========================

[](#production-configuration)

SUBSCRIPTION\_KEY\_PRODUCTION=&lt;your\_production\_subscription\_key&gt; CALLBACK\_HOST\_PRODUCTION=&lt;your\_production\_callback\_url&gt; PAYME\_CREDENTIAL\_EMAIL=&lt;your\_production\_email&gt; PAYME\_CREDENTIAL\_PASSWORD=&lt;your\_production\_password&gt;

### 3. Running the Application

[](#3-running-the-application)

To test the integration in **sandbox** mode, ensure that the `PAYME_ENV` is set to `sandbox part` in your `.env` file.

php index.php

### 4. Payment Processing

[](#4-payment-processing)

Use the provided `postPayment` and `postPaymentItem` functions to initiate a payment. Here's an example of how to call them:

```
use PaymeQuantum\PaymentSdk\Payment;

$email = PAYME_CREDENTIAL_EMAIL;
$password = PAYME_CREDENTIAL_PASSWORD;
$subscriptionKey = PAYME_SUBSCRIPTION_KEY;
$sdk = new Payment($email, $password, $subscriptionKey);

$transaction = $sdk->postPayment([
  'reference' => 'TEST006',
  'amount' => 2000,
  'fees' => 50,
  'tva' => 5,
  'description' => 'First Bill Payment',
]);
var_dump($transaction);

$payment = $sdk->postPaymentItem([
  'currency' => 'XAF',
  'customer_name' => 'John',
  'customer_email' => 'Doe',
  'customer_country' => 'CM',
  'amount' => 1000,
  'fees' => 50,
  'transaction_id' => $transaction->id,
  'phone' => '677777777',
]);

var_dump($payment);
```

For Developers
--------------

[](#for-developers)

### Different types declaration of the system

[](#different-types-declaration-of-the-system)

```
type Payment = [
  'reference' => string,
  'account_id' => int,
  'amount' => int,
  'fees' => int,
  'tva' => int,
  'description' => string,
  'status' => string,
  'created_at' => string,
  'updated_at' => string,
];

type PaymentItem = [
  'reference' => string,
  'payment_id' => int,
  'customer_id' => int,
  'amount' => int,
  'fees' => int,
  'phone' => string,
  'payment_method' => string,
  'payment_proof' => string,
  'status' => string,
  'created_at' => string,
  'updated_at' => string,
];

type Fees = [
  'operation_type' => string,
  'corridor_tag' => string,
  'operand' => string,
  'min_amount' => int,
  'max_amount' => int,
  'value' => int,
];

interface PaymentParam {
  'reference' => string,
  'amount' => int,
  'fees' => int,
  'tva' => int,
  'description' => string,
}

interface PaymentItemParam {
  'reference' => string,
  'currency' => string,
  'customer_name' => string,
  'customer_email' => string,
  'customer_country' => string,
  'amount' => int,
  'fees' => int,
  'transaction_id' => int,
  'phone' => string,
}
```

Methods

php

### `getFees(amount: int, country: string): array;`

[](#getfeesamount-int-country-string-array)

Given an amount, this function allows you to get the fees associated with an operation.

php

### `postPayment(param: PaymentParam): array;`

[](#postpaymentparam-paymentparam-array)

Initiates the transaction request. php

### `getPaymentStatus(reference: string): array;`

[](#getpaymentstatusreference-string-array)

Retrieves the status of the transaction request. php

### `postPaymentItem(param: PaymentItemParam): array;`

[](#postpaymentitemparam-paymentitemparam-array)

Initiates the payment request. Don't forget that a payment is related to a specific transaction. php

### `getPaymentItemStatus(reference: string): array;`

[](#getpaymentitemstatusreference-string-array)

Retrieves the status of the payment request. php

### `getPaymentWithItems(reference: string): array;`

[](#getpaymentwithitemsreference-string-array)

Polls for the transaction status and all its related payments.

Error Handling
--------------

[](#error-handling)

- In case of an error during API requests, detailed error responses are logged.
- If the callback URL fails, the fallback polling mechanism ensures that the payment status is eventually retrieved.

Roadmap
-------

[](#roadmap)

- **Future Support**: Plans to expand SDK functionality to support other MoMo API features beyond collections, including disbursements and transfers.

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

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70.6% 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 ~2 days

Total

4

Last Release

583d ago

PHP version history (3 changes)v0.0.0PHP ^8.0

0.0.2PHP ^7.0 || ^8.0

0.0.3PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/248ea3c021da0a18a04d1058189ab7d69592448f808f0b160430c62eb1ad2eba?d=identicon)[Tech Quantum](/maintainers/Tech%20Quantum)

---

Top Contributors

[![mvelemvele](https://avatars.githubusercontent.com/u/39393181?v=4)](https://github.com/mvelemvele "mvelemvele (12 commits)")[![aristidemoney](https://avatars.githubusercontent.com/u/213730177?v=4)](https://github.com/aristidemoney "aristidemoney (4 commits)")[![techpeexit](https://avatars.githubusercontent.com/u/167566778?v=4)](https://github.com/techpeexit "techpeexit (1 commits)")

---

Tags

moneymobilesecurepaymentgatewaywallettransfertransactionMobileMoneyOrangeMoney

### Embed Badge

![Health badge](/badges/payme-quantum-payment-sdk/health.svg)

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

###  Alternatives

[bitpay/sdk

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

42337.5k4](/packages/bitpay-sdk)[021/laravel-wallet

Reliable and flexible wallet system for Laravel

2785.2k](/packages/021-laravel-wallet)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

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

PHPackages © 2026

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