PHPackages                             arttiger/laravel-ubki - 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. arttiger/laravel-ubki

ActiveLibrary[API Development](/categories/api)

arttiger/laravel-ubki
=====================

Laravel package for integration with UBKI

v1.1.0(3y ago)048MITPHP

Since Sep 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/arttiger/laravel-ubki)[ Packagist](https://packagist.org/packages/arttiger/laravel-ubki)[ Docs](https://github.com/arttiger/laravel-ubki)[ RSS](/packages/arttiger-laravel-ubki/feed)WikiDiscussions dev Synced yesterday

READMEChangelog (6)Dependencies (6)Versions (9)Used By (0)

Laravel-Ubki
============

[](#laravel-ubki)

 [![StyleCI Status](https://camo.githubusercontent.com/052db2b2ec01ddaf816768cf569b67a53c9dc1f1351d332c3dd811f9881404fb/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3430323035383130362f736869656c643f7374796c653d666c6174)](https://github.styleci.io/repos/402058106) [![Total Downloads](https://camo.githubusercontent.com/d498aac645228e34a09f8c55755a3c0a71c1068a18f9e4ff68235e3ee0d84e19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61727474696765722f6c61726176656c2d75626b693f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-ubki) [![Latest Stable Version](https://camo.githubusercontent.com/b0b0b47df4c13d89937d0b2dea9b3f9020f223dda36df4d1453e53fe9380d983/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61727474696765722f6c61726176656c2d75626b693f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-ubki) [![License](https://camo.githubusercontent.com/34230957317f2cdd1665511cb8fc6e13016f6a3e903412f5d34bc34ed8de5764/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61727474696765722f6c61726176656c2d75626b693f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-ubki)

[Украинское бюро кредитных историй (УБКИ)](https://www.ubki.ua/) занимается сбором, хранением, обработкой и предоставлением кредитных историй. УБКИ получает информацию о заемщиках от банков, страховых компаний, лизинговых компаний, кредитных союзов и других финансовых институтов. Информация передается на добровольной основе и только при наличии письменного согласия заемщика.

Для автоматизации взаимодействия с УБКИ существует [web-сервис](https://sites.google.com/ubki.ua/doc/%D0%BE%D0%B1%D1%89%D0%B8%D0%B5-%D0%BF%D1%80%D0%B8%D0%BD%D1%86%D0%B8%D0%BF%D1%8B-%D0%B2%D0%B7%D0%B0%D0%B8%D0%BC%D0%BE%D0%B4%D0%B5%D0%B9%D1%81%D1%82%D0%B2%D0%B8%D1%8F), который принимает запросы, обрабатывает и выдает ответ в зависимости от типа запроса.

This package allows you to simply and easily work with the web-service UBKI.

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

[](#installation)

Install the package via composer:

```
$ composer require arttiger/laravel-ubki
```

Next, you need to run migrations:

```
$ php artisan migrate
```

### Configuration

[](#configuration)

In order to edit the default configuration you may execute:

```
php artisan vendor:publish --provider="Arttiger\Ubki\UbkiServiceProvider"

```

After that, `config/ubki.php` will be created.

### Environment

[](#environment)

Set environment variable (`.env`)

```
UBKI_TEST_MODE=true
UBKI_ACCOUNT_LOGIN=
UBKI_ACCOUNT_PASSWORD=
UBKI_AUTH_URL=https://secure.ubki.ua/b2_api_xml/ubki/auth
UBKI_REQUEST_URL=https://secure.ubki.ua/b2_api_xml/ubki/xml
UBKI_UPLOAD_URL=https://secure.ubki.ua/upload/data/xml
UBKI_TEST_AUTH_URL=https://secure.ubki.ua:4040/b2_api_xml/ubki/auth
UBKI_TEST_REQUEST_URL=https://secure.ubki.ua:4040/b2_api_xml/ubki/xml
UBKI_TEST_UPLOAD_URL=https://secure.ubki.ua:4040/upload/data/xml

```

Usage
-----

[](#usage)

Add `IntegratorUbki`-trait to the model with client data:

```
    use Arttiger\Ubki\Traits\IntegratorUbki;

    class Loan extends Model
    {
        use IntegratorUbki;
        ...
    }

```

Set the necessary the mapping variables in `config/ubki.php`:

```
'model_data' => [
  'okpo'  => 'inn',           // ИНН
  'lname' => 'lastName',      // Фамилия
  'fname' => 'firstName',     // Имя
  'mname' => 'middleName',    // Отчество
  'bdate' => 'birth_date',    // Дата рождения (гггг-мм-дд)
  'dtype' => 'passport_type', // Тип паспорта (см. справочник "Тип документа")
  'dser'  => 'passport_ser',  // Серия паспорта или номер записи ID-карты
  'dnom'  => 'passport_num',  // Номер паспорта или номер ID-карты
  'ctype' => 'contact_type',  // Тип контакта (см. справочник "Тип контакта")
  'cval'  => 'contact_val',   // Значение контакта (например - "+380951111111")
  'foto'  => 'foto',          //
],

```

This map establishes the correspondence between the attributes of your model and the required query fields in UBKI.

Add a new method `ubkiAttributes()` to the class to add the necessary attributes and fill them with data:

```
    use Arttiger\Ubki\Traits\IntegratorUbki;

    class Loan extends Model
    {
        use IntegratorUbki;
        ...

        public function ubkiAttributes($params = [])
        {
            $client_data = json_decode($this->attributes['client_data']);
            $this->attributes['inn']        = trim($client_data->code);
            $this->attributes['lastName']   = trim($client_data->lastName);
            ...
        }
    }

```

You can use other ways to create custom attributes that you specified in `'model_data'` (`config/ubki.php`).

Now, you can get data from UBKI:

```
$loan = Loan::find(1);
$result = $loan->ubki();
```

`$result['response']` - xml response from UBKI (standard report).

You can also pass parameters:

```
$result = $loan->ubki($params);
```

- `$params['report']` - report alias, if you need other reports;
- `$params['request_id']` - your request ID (if necessary);
- `$params['lang']` - search language;
- `$params['delete_all_history']` - set true if you want delete all history;

You can send the loan data to UBKI:

```
$result = $loan->ubki_upload($params);
```

`$params` - will be passed to the ubkiAttributes() method in the model.

For switching between accounts you should add to params:

- to select second account

```
$params = [
    'test' => false,
    'use_second_account_login' => true
];
```

- to select main account

```
$params = [
    'test' => false,
    'use_second_account_login' => false
];
```

if you not select what account to use, last used account will be executed.

Change log
----------

[](#change-log)

Please see the [changelog](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

[Volodymyr Farylevych](https://github.com/arttiger)

License
-------

[](#license)

Please see the [license file](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Every ~83 days

Recently: every ~31 days

Total

8

Last Release

1129d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63ea581311941682a78de132261c405a35be7113b60482778b89afa8c5e36c32?d=identicon)[vfarylevych](/maintainers/vfarylevych)

---

Top Contributors

[![arttiger](https://avatars.githubusercontent.com/u/88475172?v=4)](https://github.com/arttiger "arttiger (5 commits)")

---

Tags

laravelUbki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arttiger-laravel-ubki/health.svg)

```
[![Health](https://phpackages.com/badges/arttiger-laravel-ubki/health.svg)](https://phpackages.com/packages/arttiger-laravel-ubki)
```

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[api-ecosystem-for-laravel/dingo-api

A RESTful API package for the Laravel and Lumen frameworks.

3121.5M10](/packages/api-ecosystem-for-laravel-dingo-api)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)

PHPackages © 2026

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