PHPackages                             abiturma/php-fints - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. abiturma/php-fints

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abiturma/php-fints
==================

An adapter to use home banking with php

2.0.1(3y ago)7241↓100%2MITPHPPHP &gt;=8.0

Since Apr 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/koona-labs/php-fints)[ Packagist](https://packagist.org/packages/abiturma/php-fints)[ RSS](/packages/abiturma-php-fints/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

Php-Fints
=========

[](#php-fints)

[![Latest Stable Version](https://camo.githubusercontent.com/12c8c27c18c173128115aabb3a63049c23b66f44c1fcd86f22c86f2de1a529e9/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f7068702d66696e74732f762f737461626c65)](https://packagist.org/packages/abiturma/php-fints)[![Tests](https://github.com/koona-labs/php-fints/actions/workflows/Tests.yml/badge.svg?branch=master)](https://github.com/koona-labs/php-fints/actions/workflows/Tests.yml/badge.svg?branch=master)[![License](https://camo.githubusercontent.com/c1d89e87e0a2f07abada1d34942abe420b7455617ac543d203ff501d9a78e74c/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f7068702d66696e74732f6c6963656e7365)](https://packagist.org/packages/abiturma/php-fints)[![composer.lock](https://camo.githubusercontent.com/390ac2cccb073517685c3703bcc5e589b22f1d88403f70b33389f8835729a97a/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f7068702d66696e74732f636f6d706f7365726c6f636b)](https://packagist.org/packages/abiturma/php-fints)

This package is a library to use an Hbci connection to your bank in order to retrieve statements of your bank accounts.

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

[](#installation)

Available through composer:

`composer require abiturma/php-fints`

Usage
-----

[](#usage)

### Initialization

[](#initialization)

First you have to create an instance of the Fints class by providing your credentials

```
use Abiturma\PhpFints\Fints

...

$fints = Fints::host('https://url-to-your-hbci-endpoint')
    ->bankCode('yourBankCode)
    ->username('yourUsername')
    ->pin('your-secret-pin');

```

The port of the connection defaults to 443, optionally you can change it by calling `->port('yourPort')`on `$fints`. The interface is fluent. In particular the order of calling the different initialization methods does not matter.

### Retrieving a list of your (sepa) accounts

[](#retrieving-a-list-of-your-sepa-accounts)

Once `Fints` is initialized, you can get a list of your accounts calling `$fints->getAccounts()`. This method returns an array of your bank accounts, i.e. an array of instances of `Abiturma\PhpFints\Models\Account`, which behave similar to laravel model classes. In particular you can query the account data by calling magic getters like so: `$account->iban`, `$account->bank_code`, ... Alternatively you can call `->toArray()` on an account, to get an associative array of its attributes.

### Retrieving the statement of a bank account

[](#retrieving-the-statement-of-a-bank-account)

For a specific account, you can get a list of all transactions by calling `$fints->getStatementOfAccount($account)`. Optionally you can pass two `DateTime` objects to restrict the transactions to a specific date range: `$fints->getStatementOfAccount($account, $from, $to)`. The result is an array of objects of type `Abiturma\PhpFints\Models\Transaction`, which behave similar to account models. In particular you can retrieve a list of all attributes by calling `->toArray()`

Among others, the following attributes are stored on the transaction model:

- `base_amount` the signed integer value of the transactions in cents (e.g. -120 means -1.20€)
- `amount` the signed float value of the transaction (e.g. -1.20)
- `remote_bank_code` the BIC of the remote account
- `remote_name` the name of the creditor/debitor
- `remote_account_number` the IBAN of the remote\_account
- `date` the booking date of the transaction
- `value_date` the value (or valuta) date of the transaction
- `description`
- `end_to_end_reference`
- `prima_nota`

SWIFT vs. Camt
--------------

[](#swift-vs-camt)

By default, `Fints` tries to get statements in the Camt format, if possible. Sometimes it might occur, that this leads to thrown exceptions while parsing the response. In that case it might be useful to specify the response format explicitly. For that reason `Fints` exposes the methods `getSwiftStatementOfAccount` and `getCamtStatementOfAccount`, which have the same signature as `getStatementOfAccount`

Customization and Integration
-----------------------------

[](#customization-and-integration)

### Credentials

[](#credentials)

It can be quite cumbersome to provide all credentials each time you use `Fints`. For that reason it is possible to create your own implementation of a credentials repository, which for example could makes use of a config storage. In that case, build your implementation `$credentials` of the interface `Abiturma\PhpFints\Credentials\HoldsCredentials` and register it:

```
use Abiturma\PhpFints\Credentials\HoldsCredentials
use Abiturma\PhpFints\Fints

class MyCredentials implements HoldsCredentials {

    public function host() {
        ...
    }

    public function setHost($host) {
        ...
    }

    ...

}

$credentials = new MyCredentials()

$fints = Fints::useCredentials($credentials)->...

```

### Logging

[](#logging)

By default outbound and inbound messages are not logged. You can enable logging by registering an implementation of `Psr\LoggerInterface` like so:

```
use Psr\LoggerInterface
use Abiturma\PhpFints\Fints

class MyLogger implements LoggerInterface {

    public function debug() {
       ...
    }

    ...

}

$logger = new MyLogger();

$fints = Fints::withLogger($logger)->host(...)->...

```

### Accounts

[](#accounts)

If you have your account data (i.e. iban, bic, account number, bank code), it is not necessary to call `->getAccounts()` first in order to get a statement. Instead you can just create an account instance on the fly:

```
use Abiturma\PhpFints\Fints
use Abiturma\PhpFints\Models\Account

$account = new Account([
    'iban' => 'yourIban',
    'bic' => 'yourBic',
    'account_number' => 'yourAccountNumber',
    'bank_code' => 'yourBankCode'
])

$transactions = Fints::host(...)
    ->...
    ->getStatementOfAccount($account)

```

If you have your own account model it can act as a valid first parameter of `->getStatementOfAccount` as long as it implements the interface `Abiturma\PhpFints\Models\IdentifiesBankAccount` which demands a method `->getAccountAttributes()` which is supposed to return an associative array with the following keys: `iban, bic, account_number, bank_code`.

Compatibility
-------------

[](#compatibility)

This library is work in progress and tested only with two banks so far. You can find the list of compatible banks in COMPATIBILITY.md. I'm looking forward to your contribution to make this list longer.

Acknowledgments
---------------

[](#acknowledgments)

This project is heavily inspired by [fints-hbci-php](https://github.com/mschindler83/fints-hbci-php) by [Markus Schindler](https://github.com/mschindler83).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% 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 ~118 days

Recently: every ~284 days

Total

12

Last Release

1292d ago

Major Versions

0.1.0 → 1.0.02019-04-01

1.0.8 → 2.0.02022-01-18

PHP version history (3 changes)0.1.0PHP ^7.1

1.0.1PHP &gt;=7.2

2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/74a51dd1e121b8f46ed894959cfc16652663d89eda408d11bb23e0f0dbb848d0?d=identicon)[abiturma](/maintainers/abiturma)

---

Top Contributors

[![abiturma](https://avatars.githubusercontent.com/u/17247267?v=4)](https://github.com/abiturma "abiturma (32 commits)")[![koona-labs](https://avatars.githubusercontent.com/u/124568679?v=4)](https://github.com/koona-labs "koona-labs (2 commits)")[![tschelabaumann](https://avatars.githubusercontent.com/u/2387044?v=4)](https://github.com/tschelabaumann "tschelabaumann (1 commits)")

---

Tags

Bankingfintshbci

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abiturma-php-fints/health.svg)

```
[![Health](https://phpackages.com/badges/abiturma-php-fints/health.svg)](https://phpackages.com/packages/abiturma-php-fints)
```

###  Alternatives

[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[j0k3r/php-readability

Automatic article extraction from HTML

186808.8k6](/packages/j0k3r-php-readability)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k134](/packages/symfony-ai-platform)[symfony/ai-agent

PHP library for building agentic applications.

30536.7k44](/packages/symfony-ai-agent)[kmukku/php-iso11649

ISO 11649 creditor reference library for php

122.0M1](/packages/kmukku-php-iso11649)

PHPackages © 2026

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