PHPackages                             payselection/paykassa-php-client - 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. payselection/paykassa-php-client

ActiveLibrary[Payment Processing](/categories/payments)

payselection/paykassa-php-client
================================

Paykassa api client

05PHP

Since Mar 6Pushed 1y ago4 watchersCompare

[ Source](https://github.com/Payselection/Paykassa-SDK-PHP)[ Packagist](https://packagist.org/packages/payselection/paykassa-php-client)[ RSS](/packages/payselection-paykassa-php-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Paykassa api Library
====================

[](#paykassa-api-library)

Оглавление
----------

[](#оглавление)

- [Установка](#%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0)
- [Начало работы](#%D0%BD%D0%B0%D1%87%D0%B0%D0%BB%D0%BE-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B)
- [Методы API](#%D0%BC%D0%B5%D1%82%D0%BE%D0%B4%D1%8B-api)
    - [Create Receipt](#create-receipt)
    - [Check Receipt](#check-receipt)
- [Работа с webhooks](#webhooks)

Установка
-----------------------------------------------

[](#установка-)

Установить библиотеку можно с помощью composer:

```
composer require paykassa/paykassa-php-client

```

Начало работы
-------------------------------------------------------

[](#начало-работы-)

1. Создайте экземпляр объекта клиента.

```
$apiClient = new \PaySelection\Library();
$apiClient->setConfiguration([
    "api_url" : "https://api.pay-kassa.com",
    "merchant_id" : "123",
    "secret_key" : "###########",
    "webhook_url" : "https://webhook.site/notification/"
]);
```

Значение `webhook_url` должно совпадать со значением `WebhookUrl` из запросов

2. Вызовите нужный метод API.

Методы API
-------------------------------------------------

[](#методы-api-)

### Create Receipt

[](#create-receipt-)

[Формирование кассового онлайн-чека в документации](https://docs.pay-kassa.com/#tag/Operacii/operation/Create%20receipt)

Запрос используется для формирования кассового онлайн-чека. Используется идентификатор организации merchant\_id, который можно получить/увидеть в ЛК Paykassa

```
try {
    $receiptItems = new ReceiptItems();
    $receiptItems->add(
        new ReceiptItemDetails(
            name: 'test name',
            price: 100,
            quantity: 1,
            sum: 100,
            payment_method: PaymentMethodType::FULL_PREPAYMENT,
            payment_object: PaymentObjectType::COMMODITY,
            vat: new VatDetails(
                type: VatType::NONE,
            )
        )
    );

    $receiptPayments = new ReceiptPayments();
    $receiptPayments->add(
        new PaymentDetails(
            type: 1,
            sum: 100,
        )
    );

    $receiptVats = new ReceiptVats();
    $receiptVats->add(
        new VatDetails(
            type: VatType::NONE,
        )
    );

    $receipt = new ReceiptDetails(
        new ClientDetails(
            email: 'test@test.com'
        ),
        new CompanyDetails(
            inn: '220221121221',
            payment_address: 'https://site.ru/'
        ),
        items: $receiptItems,
        payments: $receiptPayments,
        vats: $receiptVats,
        total: 100,
    );

    $response = $apiClient->createReceipt(new CreateCheckRequest(
        operation_type: OperationType::INCOME,
        order_number: 'Test receipt',
        receipt: $receipt
    ));
} catch (\Exception $e) {
    $response = $e->getMessage();
}

var_dump($response);
```

### Check Receipt

[](#check-receipt-)

[Получение информации по чеку в документации](https://docs.pay-kassa.com/#tag/Operacii/operation/Check%20receipt)

Запрос используется для получения информации по чеку, а также уточнение о его текущем статусе.

```
try {
    $response = $apiClient->checkReceipt('123');
} catch (\Exception $e) {
    $response = $e->getMessage();
}

var_dump($response);
```

Работа с webhooks
------------------------------------------------------

[](#работа-с-webhooks-)

[Webhook в документации](https://docs.pay-kassa.com/#tag/Webhooks-or-Vebhuk/operation/receipt)

```
try {
    $result = $apiClient->hookPay();
} catch (\Exception $e) {
    $response = $e->getMessage();
}

var_dump($result);
```

License
-------

[](#license)

MIT

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/42aa78b17308500e4dbb81983947de71b07e489af60844263d44669c2e11d96a?d=identicon)[Vadim Beletsky](/maintainers/Vadim%20Beletsky)

---

Top Contributors

[![vitalysolbeg](https://avatars.githubusercontent.com/u/103665934?v=4)](https://github.com/vitalysolbeg "vitalysolbeg (3 commits)")[![sl-and](https://avatars.githubusercontent.com/u/56913071?v=4)](https://github.com/sl-and "sl-and (1 commits)")

### Embed Badge

![Health badge](/badges/payselection-paykassa-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/payselection-paykassa-php-client/health.svg)](https://phpackages.com/packages/payselection-paykassa-php-client)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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