PHPackages                             igormukhingmailcom/privatbank-bundle - 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. igormukhingmailcom/privatbank-bundle

ActiveBundle[API Development](/categories/api)

igormukhingmailcom/privatbank-bundle
====================================

261PHP

Since Apr 30Pushed 9y ago3 watchersCompare

[ Source](https://github.com/igormukhingmailcom/privatbank-bundle)[ Packagist](https://packagist.org/packages/igormukhingmailcom/privatbank-bundle)[ RSS](/packages/igormukhingmailcom-privatbank-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

MukhinPrivatbankBundle
======================

[](#mukhinprivatbankbundle)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8ba670861ef37c45668a39976c23d70982245df2e8235906e0d27cef039e81a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69676f726d756b68696e676d61696c636f6d2f70726976617462616e6b2d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/igormukhingmailcom/privatbank-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/0c22854f87c248a7663e35a9930f18a6aa2f64994a592d1e55a31bc8cb5b1f94/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69676f726d756b68696e676d61696c636f6d2f70726976617462616e6b2d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/igormukhingmailcom/privatbank-bundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/ce32c103a602d5bc64597bd9a3c23a7c5a7d8fc569981dac7b4aa58df587dfe7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f69676f726d756b68696e676d61696c636f6d2f70726976617462616e6b2d62756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/igormukhingmailcom/privatbank-bundle/build-status/master)

This bundle provides ability to interact with Privatbank/Privat24 API ().

Not all available methods implemented (only informational ones for personal accounts). Fill free to contribute.

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

[](#installation)

```
composer require igormukhingmailcom/privatbank-bundle
```

```
# app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new Mukhin\PrivatbankBundle\MukhinPrivatbankBundle(),
        ];
    }
}
```

Configuration
-------------

[](#configuration)

```
# app/config/parameters.yml
parameters:
    ...
    privatbank_merchant_id: 12345
    privatbank_merchant_secret: Xn3U9xm01DF4888LY1W2Zz5eDXwkMrBZ
    privatbank_card_number: 4149437864339229
```

```
# app/config/parameters.yml.dist
parameters:
    ...
    # Privatbank merchant
    privatbank_merchant_id: ~
    privatbank_merchant_secret: ~
    privatbank_card_number: ~
```

```
# app/config/config.yml
mukhin_privatbank:
    merchants:
        my_merchant_name:
            merchant_id: "%privatbank_merchant_id%"
            merchant_secret: "%privatbank_merchant_secret%"
            card_number: "%privatbank_card_number%"
```

Regarding this configuration, merchant service `mukhin_privatbank.merchant.my_merchant_name`will be created.

Usage
=====

[](#usage)

```
$merchant = $this->get('mukhin_privatbank.merchant.my_merchant_name');

# Balance
$balance = $merchant->getBalance();
echo sprintf(
    '%s: Balance at card %s is %s %s',
    $balance->getBalanceDate()->format('Y-m-d H:i:s'),
    $balance->getCard()->getCardNumber(),
    $balance->getBalance(),
    $balance->getCard()->getCurrency()
);

# History
$sinceDate = new \DateTime('1970-01-01');
$toDate = new \DateTime();
$history = $merchant->getHistory($sinceDate, $toDate);

echo sprintf(
    'Debit is %s, credit is %s for period %s-%s',
    $history->getCredit(),
    $history->getDebit(),
    $sinceDate->format('Y-m-d H:i:s'),
    $toDate->format('Y-m-d H:i:s')
);
foreach ($history->getStatements() as $statement)
    echo sprintf(
        '%s %s, balance is %s %s at %s (%s)',
        $statement->getSignedAmount(),
        $statement->getCurrency(),
        $statement->getBalance(),
        $statement->getCurrency(),
        $statement->getTransactionDate()->format('Y-m-d H:i:s'),
        $statement->getDescription()
    );
}
```

To read
=======

[](#to-read)

-
-

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/28d1637f14eee978c03adcc50747aa04556898f70e71ba1a3633ef4fc6cb6876?d=identicon)[igormukhingmailcom](/maintainers/igormukhingmailcom)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/igormukhingmailcom-privatbank-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/igormukhingmailcom-privatbank-bundle/health.svg)](https://phpackages.com/packages/igormukhingmailcom-privatbank-bundle)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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