PHPackages                             sushi-market/digitalkassa-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. [API Development](/categories/api)
4. /
5. sushi-market/digitalkassa-sdk

ActiveLibrary[API Development](/categories/api)

sushi-market/digitalkassa-sdk
=============================

PHP SDK for DigitalKassa API v2.1

v0.2.0(1mo ago)01↑2900%MITPHPPHP ^8.4CI passing

Since Mar 24Pushed 1mo agoCompare

[ Source](https://github.com/sushi-market/digitalkassa-sdk)[ Packagist](https://packagist.org/packages/sushi-market/digitalkassa-sdk)[ RSS](/packages/sushi-market-digitalkassa-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (4)Used By (0)

DigitalKassa SDK for PHP
========================

[](#digitalkassa-sdk-for-php)

[![PHP Version](https://camo.githubusercontent.com/bfb98d885e37493cddcc01059ebf02a8872de9da37c12691b8bb6d13fcdca735/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342532422d626c75652e737667)](https://php.net)[![Tests](https://github.com/sushi-market/digitalkassa-sdk/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/sushi-market/digitalkassa-sdk/actions/workflows/tests.yml)[![Latest Version](https://camo.githubusercontent.com/717efcd34b0fdb4315ae6aec9082ad2bd27c56ef4df3b20957d2a9f7b3567072/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73757368692d6d61726b65742f6469676974616c6b617373612d73646b2e7376673f7374796c653d666c61742d737175617265)](https://github.com/sushi-market/digitalkassa-sdk/releases)[![Total Downloads](https://camo.githubusercontent.com/6b32abc80801c8d831796743b4b983e7d6cb1d800689bc4937188695b0949769/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73757368692d6d61726b65742f6469676974616c6b617373612d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sushi-market/digitalkassa-sdk)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

SDK на основе версии документа **2.1.0**

Установка:

```
composer require sushi-market/digitalkassa-sdk
```

```
use DF\DigitalKassa\V2\DigitalKassaApi;
use DF\DigitalKassa\V2\ValueObjects\Credentials;

$digitalkassa = new DigitalKassaApi(
    credentials: new Credentials(
        actorId: '1234567',
        actorToken: 'secret-token',
        cGroupId: 1,
    ),
);
```

💰 Работа с НДС (VatType)
------------------------

[](#-работа-с-ндс-vattype)

В SDK доступен enum `VatType`, который инкапсулирует тип ставки НДС для чеков DigitalKassa и содержит хелперы для расчёта суммы с НДС, выделения НДС и получения суммы без НДС.

Поддерживаются:

- обычные ставки (0%, 5%, 7%, 10%, 20%, 22%)
- расчетные ставки (5/105, 7/107, 10/110, 20/120, 22/122)
- режим без НДС

### Начисление НДС (из цены без НДС в цену с НДС)

[](#начисление-ндс-из-цены-без-ндс-в-цену-с-ндс)

```
use DF\DigitalKassa\V2\Enums\VatType;

$vat = VatType::VAT_20;

$net = 1000.00;
$gross = $vat->applyVat($net);

// 1200.00
```

### Выделение НДС из суммы с НДС

[](#выделение-ндс-из-суммы-с-ндс)

```
use DF\DigitalKassa\V2\Enums\VatType;

$vat = VatType::VAT_20;

$gross = 1200.00;
$vatAmount = $vat->extractVat($gross);

// 200.00
```

### Получение суммы без НДС

[](#получение-суммы-без-ндс)

```
use DF\DigitalKassa\V2\Enums\VatType;

$vat = VatType::VAT_20;

$gross = 1200.00;
$net = $vat->removeVat($gross);

// 1000.00
```

Основные методы
---------------

[](#основные-методы)

- `getCGroupInfo()`
- `createReceipt()`
- `getReceiptInfo()`
- `createCorrectionReceipt()`
- `getCorrectionReceiptInfo()`
- `getShiftReport()`
- `openShift()`
- `closeShift()`
- `changeShiftMode()`

Быстрый пример создания чека
----------------------------

[](#быстрый-пример-создания-чека)

```
use DF\DigitalKassa\V2\DTO\Receipt\ItemDTO;
use DF\DigitalKassa\V2\DTO\Receipt\ReceiptDTO;
use DF\DigitalKassa\V2\DTO\Receipt\ReceiptRequestDTO;
use DF\DigitalKassa\V2\DTO\Shared\AmountDTO;
use DF\DigitalKassa\V2\DTO\Shared\LocationDTO;
use DF\DigitalKassa\V2\DTO\Shared\NotifyDTO;
use DF\DigitalKassa\V2\Enums\InternetMode;
use DF\DigitalKassa\V2\Enums\ItemType;
use DF\DigitalKassa\V2\Enums\PaymentMethod;
use DF\DigitalKassa\V2\Enums\ReceiptType1054;
use DF\DigitalKassa\V2\Enums\Taxation;
use DF\DigitalKassa\V2\Enums\Timezone;
use DF\DigitalKassa\V2\Enums\Unit;
use DF\DigitalKassa\V2\Enums\VatType;

$response = $digitalkassa->createReceipt(new ReceiptRequestDTO(
    receipt_id: 'receipt123',
    receipt: new ReceiptDTO(
        type: ReceiptType1054::SELL,
        items: [
            new ItemDTO(
                type: ItemType::PRODUCT,
                name: 'Coffee',
                price: 100.00,
                quantity: 1.0,
                amount: 100.00,
                payment_method: PaymentMethod::FULL_PAYMENT,
                unit: Unit::PIECE,
                vat: VatType::VAT_20,
            ),
        ],
        taxation: Taxation::OSN,
        is_internet: InternetMode::ON,
        timezone: Timezone::UTC_5,
        notify: new NotifyDTO(
            emails: ['customer@example.com'],
            phone: '+79990000000',
        ),
        amount: new AmountDTO(cashless: 100.00),
        loc: new LocationDTO(billing_place: 'site.example'),
    ),
));
```

Примеры вызова
--------------

[](#примеры-вызова)

### Получение информации о группе касс

[](#получение-информации-о-группе-касс)

```
$cGroupInfo = $digitalkassa->getCGroupInfo();
```

### Получение статуса чека

[](#получение-статуса-чека)

```
use DF\DigitalKassa\V2\DTO\Receipt\ReceiptInfoRequestDTO;

$receiptInfo = $digitalkassa->getReceiptInfo(
    new ReceiptInfoRequestDTO(receipt_id: 'receipt123'),
);
```

### Создание чека коррекции

[](#создание-чека-коррекции)

```
use DF\DigitalKassa\V2\DTO\CorrectionReceipt\CorrectionReceiptDTO;
use DF\DigitalKassa\V2\DTO\CorrectionReceipt\CorrectionReceiptRequestDTO;
use DF\DigitalKassa\V2\DTO\Shared\CorrectionNotifyDTO;

$correctionResponse = $digitalkassa->createCorrectionReceipt(new CorrectionReceiptRequestDTO(
    receipt_id: 'correction123',
    correction_receipt: new CorrectionReceiptDTO(
        type: ReceiptType1054::SELL_REFUND,
        items: [
            new ItemDTO(
                type: ItemType::PRODUCT,
                name: 'Coffee',
                price: 100.00,
                quantity: 1.0,
                amount: 100.00,
                payment_method: PaymentMethod::FULL_PAYMENT,
                unit: Unit::PIECE,
                vat: VatType::VAT_20,
            ),
        ],
        taxation: Taxation::OSN,
        corrected_date: '24.03.2026',
        amount: new AmountDTO(cashless: 100.00),
        is_internet: InternetMode::ON,
        timezone: Timezone::UTC_5,
        loc: new LocationDTO(billing_place: 'site.example'),
        notify: new CorrectionNotifyDTO(phone: '+79990000000'),
    ),
));
```

### Получение статуса чека коррекции

[](#получение-статуса-чека-коррекции)

```
use DF\DigitalKassa\V2\DTO\CorrectionReceipt\CorrectionReceiptInfoRequestDTO;

$correctionInfo = $digitalkassa->getCorrectionReceiptInfo(
    new CorrectionReceiptInfoRequestDTO(receipt_id: 'correction123'),
);
```

### Работа со сменой

[](#работа-со-сменой)

```
use DF\DigitalKassa\V2\DTO\Shift\ShiftModeRequestDTO;
use DF\DigitalKassa\V2\DTO\Shift\ShiftRequestDTO;
use DF\DigitalKassa\V2\Enums\ShiftMode;

$shiftReport = $digitalkassa->getShiftReport();

$digitalkassa->openShift(new ShiftRequestDTO(
    name: 'Cashier',
    tin: '123456789012',
));

$digitalkassa->changeShiftMode(new ShiftModeRequestDTO(
    mode: ShiftMode::MANUAL,
));

$digitalkassa->closeShift();
```

Документация
------------

[](#документация)

- [DigitalKassa API v2.1](https://api.digitalkassa.ru/v2.1/doc)
- [OpenAPI 2.1.0](https://api.digitalkassa.ru/v2.1/APIv2.1.json?type=api&format=json&dereference=true)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

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

Every ~0 days

Total

2

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d03d06109b9abe3f343a67353d431ec04fdbce0578d720fd5a936fa2394ed76?d=identicon)[denis660](/maintainers/denis660)

---

Top Contributors

[![denis660](https://avatars.githubusercontent.com/u/53209140?v=4)](https://github.com/denis660 "denis660 (4 commits)")[![m0nclous](https://avatars.githubusercontent.com/u/18490365?v=4)](https://github.com/m0nclous "m0nclous (1 commits)")

---

Tags

phpapisdkreceiptdigitalkassa

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sushi-market-digitalkassa-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/sushi-market-digitalkassa-sdk/health.svg)](https://phpackages.com/packages/sushi-market-digitalkassa-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

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