PHPackages                             vlsv/pushkin-card-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. vlsv/pushkin-card-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

vlsv/pushkin-card-api
=====================

Клиент для работы с API Пушкинская карта

v1.0.5(3y ago)1175MITPHPPHP ^8.1

Since Jul 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/skodnik/pushkin-card-api)[ Packagist](https://packagist.org/packages/vlsv/pushkin-card-api)[ RSS](/packages/vlsv-pushkin-card-api/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (7)Used By (0)

[![phpunit tests](https://github.com/skodnik/pushkin-card-api/actions/workflows/php.yml/badge.svg)](https://github.com/skodnik/pushkin-card-api/actions/workflows/php.yml/badge.svg)

Работа с билетами в рамках программы «Пушкинская карта»
=======================================================

[](#работа-с-билетами-в-рамках-программы-пушкинская-карта)

API для передачи информации в реестр сведений о билетах - [docs.culture.ru/tickets](https://docs.culture.ru/tickets/)

Официальная документация - [docs.culture.ru/documents](https://docs.culture.ru/documents)

Требования
----------

[](#требования)

- php 8.1 и выше
- php-ext-curl
- php-ext-json
- php-ext-mbstring

Установка библиотеки
--------------------

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

```
composer require vlsv/pushkin-card-api
```

Использование
-------------

[](#использование)

```
require_once(__DIR__ . '/vendor/autoload.php');

$config = new ClientConfig(
    accessToken: 'your_access_token',
    host: 'https://pushka-uat.test.gosuslugi.ru/api/v1'
);

$visitor = new \Vlsv\PushkinCardApi\Model\Visitor(...);
$buyer = new \Vlsv\PushkinCardApi\Model\Buyer(...);
$session = new \Vlsv\PushkinCardApi\Model\Session(...);
$payment = new \Vlsv\PushkinCardApi\Model\Payment(...);

$createTicketRequest = new \Vlsv\PushkinCardApi\Model\CreateTicketRequest(
    barcode: $barcode,
    barcode_type: $barcodeType,
    visitor: $visitor,
    buyer: $buyer,
    session: $session,
    payment: $payment,
    comment: ''
);

$apiClient = new ApiClient(
    client: new GuzzleHttp\Client(),
    config: $config
);

// Добавление билета в реестр.
try {
    $ticket = $apiClient->postTicket($createTicketRequest);

    echo $ticket->getId();
} catch (\Throwable $exception) {
    echo $exception->getMessage();
}

// Больше примеров использования в тестах.
```

API Endpoints
-------------

[](#api-endpoints)

- UAT -
- PROD -

### Продавцы билетов

[](#продавцы-билетов)

МетодЗапросОписание**ticketsPost****POST** /ticketsДобавление билета в реестр**ticketsIdGet****GET** /tickets/{id}Получение информации о билете**ticketsIdRefundPut****PUT** /tickets/{id}/refundВернуть билет**ticketsIdVisitPut****PUT** /tickets/{id}/visitПогасить билет### Контролёры билетов

[](#контролёры-билетов)

МетодЗапросОписание**eventsEventIdTicketsBarcodeGet****GET** /events/{event\_id}/tickets/{barcode}Получение информации о сеансе по билету**eventsEventIdTicketsBarcodeVisitPut****PUT** /events/{event\_id}/tickets/{barcode}/visitПогасить билетСпецификация - [tickets](specs/tickets.yaml). Актуальная спецификация - [docs.culture.ru/tickets](https://docs.culture.ru/tickets/).

Тесты
-----

[](#тесты)

Создать и настроить переменные окружения в файле `phpunit.xml`. `EVENT_ID`, `ORGANIZATION_ID`, `ACCESS_TOKEN`, `UAT_HOST` запросить в службе поддержки [docs.culture.ru/](https://docs.culture.ru/).

```
cp phpunit.xml.dist phpunit.xml
```

### Запуск тестов

[](#запуск-тестов)

Все группы.

```
composer tests
```

Только юнит.

```
composer tests-unit
```

Только интеграционные.

```
composer tests-integration
```

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~3 days

Total

6

Last Release

1335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a2237c67741e5be893af5ebbcf4fdf0eac507ebb6cea1882a39770891aff07a?d=identicon)[vlsv](/maintainers/vlsv)

---

Top Contributors

[![skodnik](https://avatars.githubusercontent.com/u/1265773?v=4)](https://github.com/skodnik "skodnik (9 commits)")

---

Tags

apirest

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vlsv-pushkin-card-api/health.svg)

```
[![Health](https://phpackages.com/badges/vlsv-pushkin-card-api/health.svg)](https://phpackages.com/packages/vlsv-pushkin-card-api)
```

###  Alternatives

[xendit/xendit-php

Xendit PHP SDK

189701.3k4](/packages/xendit-xendit-php)[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

911.8M9](/packages/infobip-infobip-api-php-client)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

33157.9k1](/packages/onesignal-onesignal-php-api)[whatarmy/fedex-rest

New FedEx Rest API wrapper

2438.7k](/packages/whatarmy-fedex-rest)

PHPackages © 2026

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