PHPackages                             grandmasterx/webmoney - 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. grandmasterx/webmoney

ActiveLibrary

grandmasterx/webmoney
=====================

WebMoney API PHP Library

v1.0(7y ago)0399BSD-3-ClausePHPPHP &gt;=5.6

Since Aug 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/GrandMasterX/webmoney)[ Packagist](https://packagist.org/packages/grandmasterx/webmoney)[ Docs](http://github.com/grandmasterx/webmoney)[ RSS](/packages/grandmasterx-webmoney/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

WebMoney API PHP Library
========================

[](#webmoney-api-php-library)

[![Packagist](https://camo.githubusercontent.com/68c2822ab5cd468da09cd144be29cd9bd8dec5ad193b74a868b7929d1f9318df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6772616e646d6173746572782f7765626d6f6e65792e737667)](https://github.com/grandmasterx/webmoney/blob/master/LICENSE.md)[![Dependency Status](https://camo.githubusercontent.com/2003d2d42d44f48e7aa410d906b8b7c04a8d4d11648716ad591544505e2aa15f/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535333136383061313065373134663965353030313061642f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/5531680a10e714f9e50010ad)[![Packagist](https://camo.githubusercontent.com/ce53375f6bf3a739f57e8d94ef4fd2d4234f4dbe4e30526bc1f1fd4aa110c702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772616e646d6173746572782f7765626d6f6e65792e737667)](https://packagist.org/packages/grandmasterx/webmoney)[![Packagist](https://camo.githubusercontent.com/56e0867a9f1b3e4c88fe8e97c646768e8f1340e7147273498c030af1fd571ba2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772616e646d6173746572782f7765626d6f6e65792e737667)](https://packagist.org/packages/grandmasterx/webmoney)

Get transparent object-oriented interaction with WebMoney API.

If you just need to sign your requests to the API, use [WebMoney Signer](https://github.com/baibaratsky/php-wmsigner), a native PHP implementation of the WMSigner authentication module.

XML-interfaces supported
------------------------

[](#xml-interfaces-supported)

- [X1](https://github.com/grandmasterx/webmoney/wiki/X1): sending invoice from merchant to customer
- [X2](https://github.com/grandmasterx/webmoney/wiki/X2): transferring funds from one purse to another
- [X3](https://github.com/grandmasterx/webmoney/wiki/X3): transactions history, checking transactions status
- [X4](https://github.com/grandmasterx/webmoney/wiki/X4): issued invoices history, verifying whether the invoices were paid
- [X5](https://github.com/grandmasterx/webmoney/wiki/X5): completing a code-protected transaction
- [X6](https://github.com/grandmasterx/webmoney/wiki/X6): sending message to any WM-identifier via internal mail
- [X8](https://github.com/grandmasterx/webmoney/wiki/X8): retrieving information about purse ownership, searching for system user by his/her identifier or purse
- [X9](https://github.com/grandmasterx/webmoney/wiki/X9): retrieving information about purse balance
- [X11](https://github.com/grandmasterx/webmoney/wiki/X11): retrieving information from client’s passport by WM-identifier
- [X13](https://github.com/grandmasterx/webmoney/wiki/X13): recalling incomplete protected transaction
- [X14](https://github.com/grandmasterx/webmoney/wiki/X14): fee-free refund
- [X15](https://github.com/grandmasterx/webmoney/wiki/X15): trust management
- [X17](https://github.com/grandmasterx/webmoney/wiki/X17): operations with arbitration contracts
- [X18](https://github.com/grandmasterx/webmoney/wiki/X18): getting transaction details via merchant.webmoney
- [X19](https://github.com/grandmasterx/webmoney/wiki/X19): verifying personal information for the owner of a WM identifier
- [X21](https://github.com/grandmasterx/webmoney/wiki/X21): setting trust for merchant payments by SMS
- [X22](https://github.com/grandmasterx/webmoney/wiki/X22): receiving the ticket of prerequest payment form at merchant.webmoney
- [X23](https://github.com/grandmasterx/webmoney/wiki/X23): rejection of received invoices or cancellation of issued invoices

XML-interfaces to top-up WMZ and WME
------------------------------------

[](#xml-interfaces-to-top-up-wmz-and-wme)

- [ATM1](https://github.com/grandmasterx/webmoney/wiki/ATM1): preliminary request on the payment possibility
- [ATM2](https://github.com/grandmasterx/webmoney/wiki/ATM2): payment request
- [WMC1](https://github.com/grandmasterx/webmoney/wiki/WMC1): preliminary request on the payment possibility (WebMoney.Check)
- [WMC2](https://github.com/grandmasterx/webmoney/wiki/WMC2): payment request (WebMoney.Check)
- [WMC3](https://github.com/grandmasterx/webmoney/wiki/WMC3): payments log (WebMoney.Check)

Megastock interfaces supported
------------------------------

[](#megastock-interfaces-supported)

- Interface for [adding Payment Integrator's merchants](https://github.com/grandmasterx/webmoney/wiki/Adding-Payment-Integrator%27s-merchant)
- Interface for [check status of merchant](https://github.com/grandmasterx/webmoney/wiki/Check-status-of-merchant)

Requirements
------------

[](#requirements)

The library requires PHP 5.3 compiled with [cURL extension](http://www.php.net/manual/en/book.curl.php) (but you can override cURL dependencies).

Installation
------------

[](#installation)

1. Install [Composer](http://getcomposer.org/):

    ```
    curl -sS https://getcomposer.org/installer | php

    ```
2. Add the php-webmoney dependency:

    ```
    php composer.phar require grandmasterx/webmoney:0.16.*

    ```

Usage
-----

[](#usage)

**There are more usage examples in [the project wiki](https://github.com/grandmasterx/webmoney/wiki).**

```
require_once(__DIR__ . '/vendor/autoload.php'); // Require autoload file generated by composer

use grandmasterx\WebMoney;
use grandmasterx\WebMoney\Api\X\X9\Request;
use grandmasterx\WebMoney\Api\X\X9\Response;
use grandmasterx\WebMoney\Request\Requester\CurlRequester;
use grandmasterx\WebMoney\Signer;

// If you don’t want to use the WM root certificate to protect against DNS spoofing, pass false to the CurlRequester constructor
$webMoney = new WebMoney(new CurlRequester);

$request = new Request;
$request->setSignerWmid('YOUR WMID');
$request->setRequestedWmid('REQUESTED WMID');

$key = 'FULL PATH TO THE KEY FILE';
// or key is a data string from DB, cache, etc.
// $key = getKeyData();

$request->sign(new Signer('YOUR WMID', $key, 'KEY FILE PASSWORD'));

// You can access the request XML: $request->getData()

if ($request->validate()) {
    /** @var Response $response */
    $response = $webMoney->request($request);

    // The response from WebMoney is here: $response->getRawData()

    if ($response->getReturnCode() === 0) {
        echo $response->getPurseByName('Z000000000000')->getAmount();
    } else {
        echo 'Error: ' . $response->getReturnDescription();
    }
}
```

Authentication with a Light certificate
---------------------------------------

[](#authentication-with-a-light-certificate)

In case of authentication with a Light certificate, pass `Request::AUTH_LIGHT` to the request constructor and use `lightAuth()` instead of `sign()`.

```
require_once(__DIR__ . '/vendor/autoload.php'); // Require autoload file generated by composer

use grandmasterx\WebMoney;
use grandmasterx\WebMoney\Api\X\X9\Request;
use grandmasterx\WebMoney\Api\X\X9\Response;
use grandmasterx\WebMoney\Request\Requester\CurlRequester;

// If you don’t want to use the WM root certificate to protect against DNS spoofing, pass false to the CurlRequester constructor
$webMoney = new WebMoney(new CurlRequester);

$request = new Request(Request::AUTH_LIGHT);
$request->setRequestedWmid('REQUESTED WMID');

$request->lightAuth('FULL PATH TO THE CERTIFICATE FILE', 'FULL PATH TO THE CERTIFICATE KEY', '(OPTIONAL) PASSWORD');

// You can access the request XML: $request->getData()

if ($request->validate()) {
    /** @var Response $response */
    $response = $webMoney->request($request);

    // The response from WebMoney is here: $response->getRawData()

    if ($response->getReturnCode() === 0) {
        echo $response->getPurseByName('Z000000000000')->getAmount();
    } else {
        echo 'Error: ' . $response->getReturnDescription();
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

2818d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da448c29b0b269957ab1b48b4e90ee34100f676f17645320ccf7fccd5c3c55f9?d=identicon)[GrandMasterX](/maintainers/GrandMasterX)

---

Top Contributors

[![GrandMasterX](https://avatars.githubusercontent.com/u/4984750?v=4)](https://github.com/GrandMasterX "GrandMasterX (2 commits)")

---

Tags

webmoneyWMXImegastockcapitallerwmsigner

### Embed Badge

![Health badge](/badges/grandmasterx-webmoney/health.svg)

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

###  Alternatives

[baibaratsky/php-webmoney

WebMoney API PHP Library

75367.4k1](/packages/baibaratsky-php-webmoney)[baibaratsky/php-wmsigner

WebMoney Signer: a native PHP implementation of the WMSigner module

16399.8k3](/packages/baibaratsky-php-wmsigner)[dercoder/omnipay-webmoney

WebMoney driver for the Omnipay payment processing library

1145.8k3](/packages/dercoder-omnipay-webmoney)

PHPackages © 2026

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