OpenBanking Connector

1.0 2019-12-07 14:49 UTC

This package is auto-updated.

Last update: 2020-09-09 23:17:05 UTC


PHP library based on Czech Open-Banking API standard.

Supported services

  • Account information
  • Balance check
  • Payment initialization (partial)


The goal is to support as many banks as possible using only one interface for a communication. Library already includes a special Authenticators and Connectors for some REST APIs.


Requiring and handling authentication token is out of scope for this library.
Using \PavelMaca\OpenBanking\Auth\Authentication interface you can use own implementation for access token handling and storage.

Some implementations require some different authentication parametrs or additional headers. For this case, you can expand or implement own Authenticator using \PavelMaca\OpenBanking\Auth\Authentication or \PavelMaca\OpenBanking\Auth\StandardAuthentication.


class BankB implements \PavelMaca\OpenBanking\Auth\Authentication

    public function getAuthHeaders(): array
        return [
            'X-Special-Header' => 'foo',
            'Authorization' => 'Bearer ' . $this->getAccessToken(),

    protected function getAccessToken(){
        // Get access token via OAUth 2.0

    public function getCertificate()
        // Custom certificate handling

Handling HTTP connection

Using interface Conncetor, you can create own HTTP handler, for executing HTTP requests. Library contains StandardConnector with data hydratation into objective data layer.


$auth = new \PavelMaca\OpenBanking\Auth\StandardAuthentication();
$auth->setCertificate(__DIR__ . '/../data/cert.crt', 'secretPassword');

$connector = new \PavelMaca\OpenBanking\Bank\StandardConnector($auth, '', 'v1'); 

try {
    $ais = new \PavelMaca\OpenBanking\Standard\AccountInformation($connector);
    $accountList = $ais->getAccountList();
    $cisp = new \PavelMaca\OpenBanking\Standard\BalanceCheck($connector);
    $transactionDetail = new \PavelMaca\OpenBanking\Standard\CISP\Parts\TransactionDetail('CZK', 100);
    $balanceCheckRequest = new \PavelMaca\OpenBanking\Standard\CISP\BalanceCheckRequest('id', 'CZ010046464', $transactionDetail);

    $pisp = new \PavelMaca\OpenBanking\Standard\PaymentInitialization($connector);
    $paymentRequest = new \PavelMaca\OpenBanking\Standard\PISP\DomesticPaymentRequest('id', 100, 'CZK', 'CZ0123', 'CZ0456');
    $accountBalance = $pisp->createPayment($paymentRequest);
} catch (\PavelMaca\OpenBanking\Standard\Exception\StandardException $ex) {

Supported banks

Library is aimed to copy Czech standard in version 2.0. Depending exactly on specific implementation, library should handle all banks following Czech Open-Banking standard.