Download the PHP package itamelions/mono-php-sdk without Composer
On this page you can find all versions of the php package itamelions/mono-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itamelions/mono-php-sdk
More information about itamelions/mono-php-sdk
Files in itamelions/mono-php-sdk
Package mono-php-sdk
Short Description PHP SDK for the Mono open banking API (mandates, accounts, debits, webhooks)
License MIT
Informations about the package mono-php-sdk
mono-php
Unofficial community PHP SDK for the Mono open banking API.
Supports Mandates, Debits, Customers, Accounts, Banks, and Webhooks.
No framework coupling — works in any PHP 8.1+ project (Laravel, Symfony, plain PHP, etc.).
Requirements
- PHP 8.1 or higher
- Composer
Installation
Quick Start
Configuration
Set your Mono secret key as an environment variable:
Then inject it:
Resource Reference
Customer
Account
Mandate
E-mandate / Sweep activation delay: Do not call
charge()until you receive theevents.mandates.readywebhook. After a customer approves a sweep or e-mandate, Mono requires up to 3 hours before the mandate is ready to debit. Callingcharge()beforereadyfires will return a Mono API error.Amounts: All
amountvalues must be in the lowest denomination of the account currency — kobo for NGN (100 kobo = ₦1). Pass500000for ₦5,000, not5000.Dates:
start_dateandend_dateacceptY-m-dstrings (e.g.'2026-01-01'). Mono interprets them as midnight UTC. If your application runs in a non-UTC timezone, use UTC-based date logic to avoid off-by-one errors on the mandate start or expiry day.
Debit
Bank
Webhook Verification
Mono signs each webhook request body with your webhook secret using HMAC-SHA512 and sends
the hex digest in the mono-webhook-secret HTTP header.
Basic usage
Manual signature verification
Idempotency
Mono may retry unacknowledged webhook deliveries up to 25 times over 48 hours. Always deduplicate on event_id before calling process() to avoid double-processing:
Supported webhook events (non-exhaustive)
| Event | Description |
|---|---|
events.mandates.created |
Mandate initiated; awaiting customer approval |
events.mandates.approved |
Customer approved the mandate |
events.mandates.ready |
Mandate ready to debit — wait for this before calling charge() |
events.mandates.rejected |
Mandate was rejected |
events.mandate.action.pause |
Mandate was paused |
events.mandate.action.reinstate |
Paused mandate was reinstated |
events.mandate.action.cancel |
Mandate was cancelled |
events.mandates.expired |
Mandate has passed its end date |
events.mandates.debit.processing |
Debit pending NIBSS confirmation |
events.mandates.debit.successful |
Debit succeeded |
events.mandates.debit.failed |
Debit failed |
Error Handling
All API errors throw subclasses of Mono\Exceptions\MonoApiException:
| Exception | When thrown |
|---|---|
MonoApiException |
Any API error (4xx/5xx) or network failure |
MonoNotFoundException |
API returns 404 Not Found |
Running Tests
Tests use Mockery to mock the Guzzle HTTP client — no live API calls are made.
What This SDK Covers
| Resource | Methods |
|---|---|
| Customer | create, update, fetch, list |
| Account | auth, fetch, transactions, identity, income, unlink |
| Mandate | initiate, create, fetch, list, pause, reinstate, cancel, balanceCheck |
| Debit | charge, fetch, all |
| Bank | list |
| Webhook | process, verifySignature, on() listener |
Version Roadmap
| Version | Scope |
|---|---|
v1.0 |
Accounts, Customers, Mandates, Debits, Banks, Webhooks |
v1.1 |
Laravel service provider + facade |
v1.2 |
Retry middleware, configurable timeout |
v2.0 |
Full Mono Connect (statement, income, identity) |
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Write tests for your changes
- Ensure all tests pass:
./vendor/bin/phpunit - Open a pull request
License
MIT — see LICENSE.
Disclaimer
This is an unofficial community SDK. It is not maintained by or affiliated with Mono. Refer to the official Mono API docs for the authoritative API reference.