EBICS-CLIENT-PHP

August 16, 2026 ยท View on GitHub

CI Latest Stable Version Total Downloads License

PHP library to communicate with a bank through EBICS protocol.
PHP EBICS Client - https://ebics-api.github.io/ebics-client-php/
Supported EBICS versions: 2.4, 2.5, 3.0; Encryption versions: E002, X002, A005, A006; Switching EBICS T/TS


๐Ÿ’ฅ (Premium) EBICS API Client

EBICS API Client is a standalone microservice that wraps this library into a ready-to-deploy banking integration solution. Ideal for fintechs, ERPs, payment processors, and enterprises needing a robust EBICS integration without building and maintaining the client layer yourself.

Premium Features

  • ๐Ÿฆ Multiple Bank connections โ€” Certificates, activation, keyring in a few clicks. Bank connections โ†’
  • ๐Ÿ’ธ Bank operations via simple form โ€” Statements and payments without EBICS protocol plumbing. Bank operations โ†’
  • ๐Ÿ“ Payment builder โ€” Create multi-order SEPA files in minutes, store and reuse them, send straight to the bank. Bank operations โ†’
  • โฐ Automation that runs while you sleep โ€” Scheduled jobs, webhooks, no missed statements. Scheduler jobs โ†’
  • ๐Ÿš€ Live in minutes โ€” Docker deployment or Installation scrip, no PHP expertise needed.
  • ๐Ÿงช Test without a real bank โ€” Dummy EBICS server for local development.
  • ๐Ÿค– AI agents, connected โ€” MCP server for Claude, Cursor, and more.
  • ๐Ÿ›ก Priority support โ€” Direct line to the dev team.

๐Ÿ‘‰ Try the DEMO ยท Learn more ยท Watch the video

Already using the open-source library and need more? The Premium microservice is the natural next step โ€” no rewrite, same protocol support, zero configuration debt.


License

ebics-api/ebics-client-php is licensed under the MIT License, see the LICENSE file for details

Installation

$ composer require ebics-api/ebics-client-php

Initialize client

You will need to have this information from your Bank: HostID, HostURL, PartnerID, UserID

<?php
use EbicsApi\Ebics\Factories\KeyringFactory;
use EbicsApi\Ebics\Services\FileKeyringManager;
use EbicsApi\Ebics\Models\Bank;
use EbicsApi\Ebics\Models\User;
use EbicsApi\Ebics\EbicsClient;
use EbicsApi\Ebics\Models\X509\BankX509Generator;

// Prepare `workspace` dir in the __PATH_TO_WORKSPACES_DIR__ manually.
// "__EBICS_VERSION__" should have value "VERSION_30" for EBICS 3.0
$keyringPath = __PATH_TO_WORKSPACES_DIR__ . '/workspace/keyring.json';
$keyringManager = new FileKeyringManager();
if (is_file($keyringPath)) {
    $keyring = $keyringManager->loadKeyring($keyringPath, __PASSWORD__, __EBICS_VERSION__);
} else {
    $keyring = $keyringManager->createKeyring(__EBICS_VERSION__);
    $keyring->setPassword(__PASSWORD__);
}
$bank = new Bank(__HOST_ID__, __HOST_URL__);
// Use __IS_CERTIFIED__ true for EBICS 3.0 and/or French banks, otherwise use false.
if(__IS_CERTIFIED__) {
    $certificateGenerator = (new BankX509Generator());
    $certificateGenerator->setCertificateOptionsByBank($bank);
    $keyring->setCertificateGenerator($certificateGenerator);
}
$user = new User(__PARTNER_ID__, __USER_ID__);
$client = new EbicsClient($bank, $user, $keyring);
if (!is_file($keyringPath)) {
    $client->createUserSignatures();
    $keyringManager->saveKeyring($client->getKeyring(), $keyringPath);
}

Global process and interaction with Bank Department

1. Create and store your 3 keys and send initialization request.

<?php

use EbicsApi\Ebics\Contracts\EbicsResponseExceptionInterface;

/* @var \EbicsApi\Ebics\EbicsClient $client */

try {
    $client->executeStandardOrder(new \EbicsApi\Ebics\Orders\INI());
    /* @var \EbicsApi\Ebics\Services\FileKeyringManager $keyringManager */
    /* @var \EbicsApi\Ebics\Models\Keyring $keyring */
    $keyringManager->saveKeyring($keyring, $keyringPath);
} catch (EbicsResponseExceptionInterface $exception) {
    echo sprintf(
        "INI request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
        $exception->getResponseCode(),
        $exception->getMessage(),
        $exception->getMeaning()
    );
}

try {
    $client->executeStandardOrder(new \EbicsApi\Ebics\Orders\HIA());
    $keyringManager->saveKeyring($keyring, $keyringPath);
} catch (EbicsResponseExceptionInterface $exception) {
    echo sprintf(
        "HIA request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
        $exception->getResponseCode(),
        $exception->getMessage(),
        $exception->getMeaning()
    );
}

2. Generate a EBICS letter

/* @var \EbicsApi\Ebics\EbicsClient $client */
$ebicsBankLetter = new \EbicsApi\Ebics\EbicsBankLetter();

$bankLetter = $ebicsBankLetter->prepareBankLetter(
    $client->getBank(),
    $client->getUser(),
    $client->getKeyring()
);

$pdf = $ebicsBankLetter->formatBankLetter($bankLetter, $ebicsBankLetter->createPdfBankLetterFormatter());

3. Wait for the bank validation and access activation.

4. Fetch the bank keys.

try {
    /* @var \EbicsApi\Ebics\EbicsClient $client */
    $client->executeInitializationOrder(new \EbicsApi\Ebics\Orders\HPB());
    /* @var \EbicsApi\Ebics\Services\FileKeyringManager $keyringManager */
    /* @var \EbicsApi\Ebics\Models\Keyring $keyring */
    $keyringManager->saveKeyring($keyring, $keyringPath);
} catch (EbicsResponseExceptionInterface $exception) {
    echo sprintf(
        "HPB request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
        $exception->getResponseCode(),
        $exception->getMessage(),
        $exception->getMeaning()
    );
}

5. Play with other transactions!

TransactionDescription
HEVDownload supported protocol versions for the Bank.
INISend to the bank public signature of signature A005.
HIASend to the bank public signatures of authentication (X002) and encryption (E002).
H3KSend to the bank public signatures of signature (A005), authentication (X002) and encryption (E002).
HCSUpload for renewing user certificates.
HPBDownload the Bank public signatures authentication (X002) and encryption (E002).
SPRSuspend activated keyring.
HPDDownload the bank server parameters.
HKDDownload customer's customer and subscriber information.
HTDDownload subscriber's customer and subscriber information.
HAADownload Bank available order types.
PTKDownload transaction status (Plain text).
HACDownload transaction status (XML).
FDLDownload the files from the bank.
FULUpload the files to the bank.
BTDDownload request files of any BTF structure.
BTUUpload the files to the bank.

If you need to parse Cfonb 120, 240, 360 use ebics-api/cfonb-php
If you need to parse MT942 use ebics-api/mt942-php