PHP library to communicate with a bank through EBICS protocol.
PHP EBICS Client - https://ebics-api.github.io/ebics-client-php/
Supported PHP versions - PHP 7.2 and higher
Supported EBICS versions: 2.4, 2.5, 3.0; Encryption versions: E002, X002, A005, A006; Switching EBICS T/TS
EBICS API Client - https://sites.google.com/view/ebics-api-client
Accelerate your financial connectivity with powerful EBICS API Client, designed for seamless integration into your infrastructure.
Whether deployed as a standalone web service or via Docker, it’s the fastest way to connect to banks using the EBICS protocol.
✅ Check the DEMO to see if it meets your needs.
✅ Integrate effortlessly with banks across Europe using the trusted EBICS standard.
✅ Easily integrate with applications written in any programming language — thanks to a clean, well-documented REST API.
✅ Apply fine-grained control over users and connections for compliance and security.
✅ Create, send, and manage EBICS orders directly from your app or backend system.
✅ View and manage all bank connections and monitor access logs in real time.
✅ Automate EBICS operations, fetch files on schedule, and store them securely.
✅ Automatically backs up fetched files and keyring data to ensure reliability and disaster recovery readiness.
Perfect for fintechs, ERPs, payment processors, and enterprises needing a robust, future-proof EBICS integration — without vendor lock-in.
ebics-api/ebics-client-php is licensed under the MIT License, see the LICENSE file for details
$ composer require ebics-api/ebics-client-phpYou 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);
}<?php
use EbicsApi\Ebics\Contracts\EbicsResponseExceptionInterface;
/* @var \EbicsApi\Ebics\EbicsClient $client */
try {
$client->INI();
/* @var \EbicsApi\Ebics\Services\FileKeyringManager $keyringManager */
/* @var \EbicsApi\Ebics\Models\Keyring $keyring */
$keyringManager->saveKeyring($keyring, $keyringRealPath);
} catch (EbicsResponseExceptionInterface $exception) {
echo sprintf(
"INI request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
$exception->getResponseCode(),
$exception->getMessage(),
$exception->getMeaning()
);
}
try {
$client->HIA();
$keyringManager->saveKeyring($keyring, $keyringRealPath);
} catch (EbicsResponseExceptionInterface $exception) {
echo sprintf(
"HIA request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
$exception->getResponseCode(),
$exception->getMessage(),
$exception->getMeaning()
);
}/* @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());try {
/* @var \EbicsApi\Ebics\EbicsClient $client */
$client->HPB();
/* @var \EbicsApi\Ebics\Services\FileKeyringManager $keyringManager */
/* @var \EbicsApi\Ebics\Models\Keyring $keyring */
$keyringManager->saveKeyring($keyring, $keyringRealPath);
} catch (EbicsResponseExceptionInterface $exception) {
echo sprintf(
"HPB request failed. EBICS Error code : %s\nMessage : %s\nMeaning : %s",
$exception->getResponseCode(),
$exception->getMessage(),
$exception->getMeaning()
);
}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
{
"VERSION": "VERSION_24|VERSION_25|VERSION_30",
"USER": {
"A": {
"VERSION": "A005|A006",
"CERTIFICATE": "null|string",
"PUBLIC_KEY": "string",
"PRIVATE_KEY": "string"
},
"E": {
"CERTIFICATE": "null|string",
"PUBLIC_KEY": "string",
"PRIVATE_KEY": "string"
},
"X": {
"CERTIFICATE": "null|string",
"PUBLIC_KEY": "string",
"PRIVATE_KEY": "string"
}
},
"BANK": {
"E": {
"CERTIFICATE": "null|string",
"PUBLIC_KEY": "null|string",
"PRIVATE_KEY": null
},
"X": {
"CERTIFICATE": null,
"PUBLIC_KEY": "null|string",
"PRIVATE_KEY": null
}
}
}- Format validators for all available ISO 20022 formats:
- upload: PAIN.001, PAIN.008, MT101, TA875, CFONB320, CFONB160 with different versions.
- download: PAIN.002, CAMT.052, CAMT.053, CAMT.054, MT199, MT900, MT910, MT940, MT942, CFONB240,CFONB245, CFONB120
- Country's Bank specific order types
- Refactor by abstraction Download and Upload Order types


