PHPackages                             atsareva/monopay - 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. atsareva/monopay

ActiveLibrary[Payment Processing](/categories/payments)

atsareva/monopay
================

A lightweight library for Monobank Acquiring, named 'Plata by Mono,' built on REST API (v2410). Documentation available at https://api.monobank.ua/docs/acquiring.html.

v1.0.0(1y ago)09Apache-2.0PHPPHP &gt;=7.4

Since Nov 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/atsareva/monopay)[ Packagist](https://packagist.org/packages/atsareva/monopay)[ RSS](/packages/atsareva-monopay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Monobank | MonoPay | Plata by Mono Library
==========================================

[](#monobank--monopay--plata-by-mono-library)

A simple PHP library to work with Monobank Acquiring. For detailed API documentation, refer to [Monobank Acquiring API](https://api.monobank.ua/docs/acquiring.html).

Dependencies
------------

[](#dependencies)

- guzzlehttp/guzzle &gt;= 7.9.0
- PHP &gt;= 7.4

How to Use
----------

[](#how-to-use)

First, obtain an API token, which is required to access Monobank's API. You can register one in your Monobank [personal account](https://web.monobank.ua/) to activate a token or enable a [test token](https://api.monobank.ua/index.html).

Run the next command to install the library with all dependencies:

```
composer require atsareva/monopay

```

Usage Examples
--------------

[](#usage-examples)

### Initialize Mono Client

[](#initialize-mono-client)

```
require_once 'vendor/autoload.php';

/** Initialize Mono client */
$client = new MonoPay\ClientMono('TOKEN');

```

### Invoice Examples

[](#invoice-examples)

#### Create an Invoice

[](#create-an-invoice)

```
$options = [
    'amount' => 5000,
    'merchantPaymInfo' => [
        'reference' => '1000000021',
        'destination' => 'Order #1000000021',
        'basketOrder' => [
            [
                'name' => 'Product ABC',
                'qty' => 1,
                'sum' => 5000, // Amount in the smallest currency unit per product unit
                'icon' => 'https://example.com/media/catalog/product/product_abc.jpg',
                'unit' => 'kg',
            ],
        ],
    ],
    'redirectUrl' => 'https://example.com/monopay/success.php',
    'webHookUrl' => 'https://example.com/monopay/webhook.php',
    'paymentType' => 'hold', // Options: debit | hold
];

try {
    $invoice = new MonoPay\Invoice();
    $invoice
        ->setClient($client)
        ->create($options);

    // Save invoice ID for future reference
    echo "Invoice ID: " . $invoice->getInvoiceId() . '';
    echo "Invoice Payment URL: " . $invoice->getPageUrl() . '';
    echo "Invoice Status: " . $invoice->getStatus() . '';

    // Redirect customer to payment page
    header("Location: " . $invoice->getPageUrl());
} catch (Exception $e) {
    // Handle error
    echo $e->getMessage();
}

```

#### Get Updated Invoice Data

[](#get-updated-invoice-data)

```
try {
    $invoice
        ->setClient($client)
        ->setInvoiceId('INVOICE_ID')
        ->updateInfo();

    echo "Invoice ID: " . $invoice->getInvoiceId() . '';
    echo "Invoice Status: " . $invoice->getStatus() . '';

} catch (Exception $e) {
    // Handle error
    echo $e->getMessage();
}

```

#### Finalize Invoice (Hold Status)

[](#finalize-invoice-hold-status)

```
try {
    $invoice
        ->setClient($client)
        ->setInvoiceId('INVOICE_ID')
        ->capture();

} catch (Exception $e) {
    // Handle error
    echo $e->getMessage();
}

```

#### Refund Invoice (Successful Payment)

[](#refund-invoice-successful-payment)

```
try {
    $invoice
        ->setClient($client)
        ->setInvoiceId('INVOICE_ID')
        ->refund()
        ->updateInfo();

    echo "Invoice Status: " . $invoice->getStatus() . '';

} catch (Exception $e) {
    // Handle error
    echo $e->getMessage();
}

```

### Merchant Examples

[](#merchant-examples)

```
try {
    $merchant = new MonoPay\Merchant();
    $merchant
        ->setClient($client)
        ->load();

    echo "Merchant ID: " . $merchant->getMerchantId() . '';
    echo "Merchant Name: " . $merchant->getMerchantName() . '';
    echo "Public Key: " . $merchant->getPublicKey() . '';

    // Load all statements from the last 4 days
    $statements = $merchant->getStatement(time() - 60 * 60 * 96);
    foreach ($statements as $statement) {
        var_dump($statement);
    }
} catch (Exception $e) {
    // Handle error
    echo $e->getMessage();
}

```

---

**Note:** This library is currently in development. Please create a ticket if you encounter any issues.

Thanks!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

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

551d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24f5e739dac274bcc3d44858253fab4b8dd2d9efda2e7e31508aaad418fd57c2?d=identicon)[atsareva](/maintainers/atsareva)

---

Top Contributors

[![atsareva](https://avatars.githubusercontent.com/u/1243876?v=4)](https://github.com/atsareva "atsareva (8 commits)")

---

Tags

mono-php-sdkmonobankmonobank-acquiringmonobank-apimonobank-clientmonopayplata-by-monoplatabymono

### Embed Badge

![Health badge](/badges/atsareva-monopay/health.svg)

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

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