Production-ready PHP client for Monobank Acquiring API

Maintainers

Package info

github.com/authorOd/monobank-acquiring

pkg:composer/vladchornyi/mono

Transparency log

Statistics

Installs: 24

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.4.0 2026-07-01 22:15 UTC

This package is auto-updated.

Last update: 2026-07-05 13:11:29 UTC


README

Latest Version on Packagist Total Downloads PHP Version License GitHub Release

Production-ready PHP client for the Monobank Acquiring API: invoices, subscriptions, statements, merchant details, webhook signature verification, and structured error handling.

Features

  • Invoices: create, status, cancel, invalidate, and hold finalization.
  • Subscriptions: create, status, list, payment history, cancel/edit.
  • Statements and merchant details.
  • Verified webhook parsing with X-Sign support.
  • Typed webhook payload helpers for invoice and subscription events.
  • Stale webhook protection via modifiedDate.
  • Replaceable HTTP layer for tests and framework integrations.
  • Structured exceptions and safe logging helpers.

Requirements

  • PHP 8.0+
  • ext-curl
  • ext-json
  • ext-mbstring
  • ext-openssl

Installation

composer require vladchornyi/mono:^1.4

Quick Start

use Vladchornyi\Mono\MonoClient;

$mono = new MonoClient($_ENV['MONO_KEY']);

$merchant = $mono->merchant()->getDetails();
$publicKey = $mono->pubkey()->get();

Documentation

Testing From Source

composer test

The default test suite is self-contained and does not call Monobank.

For an optional live smoke test, set MONO_KEY or MONO_ENV_FILE:

MONO_KEY=... composer test:live
MONO_ENV_FILE=/path/to/.env composer test:live

To verify live invoice and subscription creation with a test merchant key:

MONO_KEY=... composer test:live-create
MONO_ENV_FILE=/path/to/.env composer test:live-create

The live create smoke test uses a minimal amount and attempts cleanup after creation.

License

MIT