PHPackages                             unitpay/php-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. unitpay/php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

unitpay/php-sdk
===============

PHP SDK for Unitpay

4.0.0(2w ago)4093.1k↓46.3%29[2 issues](https://github.com/unitpay/unitpay-php/issues)MITPHPPHP &gt;=7.4CI passing

Since Mar 3Pushed 2w ago4 watchersCompare

[ Source](https://github.com/unitpay/unitpay-php)[ Packagist](https://packagist.org/packages/unitpay/php-sdk)[ Docs](https://unitpay.ru)[ RSS](/packages/unitpay-php-sdk/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (9)Dependencies (5)Versions (16)Used By (0)

Unitpay PHP SDK
===============

[](#unitpay-php-sdk)

[![CI](https://github.com/unitpay/php-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/unitpay/php-sdk/actions/workflows/ci.yml)[![Latest Stable Version](https://camo.githubusercontent.com/0eed0efae367e717b9544a3c642b583e2201295bc49265493940697413b6d92e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e69747061792f7068702d73646b2e737667)](https://packagist.org/packages/unitpay/php-sdk)[![PHP Version](https://camo.githubusercontent.com/19c99287607f0df273f1d72bcd9217e2d55a672cc8b13b25bd277bcd2993e3ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f756e69747061792f7068702d73646b2e737667)](https://packagist.org/packages/unitpay/php-sdk)[![Total Downloads](https://camo.githubusercontent.com/1ce28b7484f86c01a4e4a24c497d6914e38491ac35cfccca85b57e01e3adb4ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e69747061792f7068702d73646b2e737667)](https://packagist.org/packages/unitpay/php-sdk)[![License](https://camo.githubusercontent.com/a06d4b1ed29ae3b2da41bf03543628f7a7b49dda1b3ca36291f757a673b991ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f756e69747061792f7068702d73646b2e737667)](LICENSE.md)

> PHP SDK for the [Unitpay.ru](https://unitpay.ru) payment REST API.

A thin, stateless SDK: build a signed redirect to Unitpay's hosted payment page or call the API server-to-server, attach 54-FZ fiscal receipts, and verify inbound webhooks. Everything hangs off one entry point, `Unitpay\Unitpay`, which hands out service objects.

Official Unitpay documentation: [help.unitpay.ru](https://help.unitpay.ru)

> **Upgrading from 3.x?** 4.0 changes the `TransportInterface` contract and starts rejecting webhooks older than 5 minutes. If you use the SDK's own transport and your server clock is synchronised, it is a version bump — see the [v4 Migration Guide](docs/migration-v4.md).
>
> **Upgrading from 2.x?** 3.0 moved every class into the `Unitpay\` namespace and replaced `api('method', [...])` with typed service methods. There is no compatibility shim — see the [v3 Migration Guide](docs/migration-v3.md), then the v4 guide.

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

[](#requirements)

- PHP &gt;= 7.4
- ext-json
- ext-ctype

No Composer dependencies. `ext-curl` is optional: the default transport uses it when present and falls back to `file_get_contents()` otherwise.

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

[](#installation)

```
composer require unitpay/php-sdk
```

Then load the Composer autoloader — the package is PSR-4 (`Unitpay\` → `src/`):

```
require __DIR__ . '/vendor/autoload.php';
```

See [Getting Started](docs/getting-started.md) for the `dev-master` option.

Quick Start
-----------

[](#quick-start)

```
