PHPackages                             cookiemc337/laravel-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. cookiemc337/laravel-fints

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

cookiemc337/laravel-fints
=========================

An HBCI-client for laravel for retrieving bank account statements

01PHP

Since Mar 20Pushed 1y agoCompare

[ Source](https://github.com/CookieMC337/laravel-fints)[ Packagist](https://packagist.org/packages/cookiemc337/laravel-fints)[ RSS](/packages/cookiemc337-laravel-fints/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel-Fints
=============

[](#laravel-fints)

[![Latest Stable Version](https://camo.githubusercontent.com/3a6783f3addbe7036bbc13e1fbed1c10cb907ad725247c537730b3ecb82dd438/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f6c61726176656c2d66696e74732f762f737461626c65)](https://packagist.org/packages/abiturma/laravel-fints)[![Tests](https://github.com/abiturma/laravel-fints/actions/workflows/testing.yml/badge.svg?branch=master)](https://github.com/abiturma/laravel-fints/actions/workflows/testing.yml/badge.svg?branch=master)[![License](https://camo.githubusercontent.com/caeda88e6c3fd4818804151a1bb07f2d1852a643cabfd594bac24844e795e686/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f6c61726176656c2d66696e74732f6c6963656e7365)](https://packagist.org/packages/abiturma/laravel-fints)[![composer.lock](https://camo.githubusercontent.com/0e5de56027b92b1d2e33c75e68c613dbf4a40ab86bfaca475b52f9d6f173e765/68747470733a2f2f706f7365722e707567782e6f72672f6162697475726d612f6c61726176656c2d66696e74732f636f6d706f7365726c6f636b)](https://packagist.org/packages/abiturma/laravel-fints)

This Laravel package is a wrapper for Php-Fints, which provides an Hbci connection to your bank in order to retrieve statements of your bank accounts. For more details about Php-Fints see its [docs](https://github.com/abiturma/php-fints).

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

[](#installation)

This package requires PHP 8.0 and Laravel 8.0 or higher. If you are on a PHP version below 8.0 or a Laravel version below 8.0 just use an older version of this package.

Available through composer:

`composer require abiturma/laravel-fints`

After installation publish the config file by calling

`php artisan vendor:publish --provider="Abiturma\LaravelFints\FintsServiceProvider"`.

you will find it under `config/laravel-fints.php`.

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

[](#configuration)

### Credential/Connection

[](#credentialconnection)

You can *optionally* set your credentials in either `laravel-fints.php` (not recommended) or `.env`. It is not recommended to store your banking pin unencrypted in your `.env` file.

### Pin encryption

[](#pin-encryption)

To encrypt your pin set `encrypt_pin => true` in your config file. To encrypt your pin, run `php artisan fints:encryt_pin`, enter your pin when asked and copy the result to your `.env`. Be aware that pin encryption provides only very limited safety since the encryption key is stored in the very same file. To have better safety it is recommended to aks the pin from the user on each request (see below).

### Logging

[](#logging)

By default logging is turned off. To enable logging, set `laravel-fints.logging.enabled` to `true`. In that case laravel's default logging channels will be used. To choose your own implementation of a logger provide the class name to `laravel-fints.logging.logger`.

**Caution!**Be aware that logging on debug level may expose your unencrypted pin in the log channel.

Usage
-----

[](#usage)

You can either use the class `Abiturma\LaravelFints\Fints` or the according facade. Both are used the same way, except that the first call on the facade is static.

### Initialization

[](#initialization)

If not done using the config, you have to provide your connection details using the methods `host`, `port`, `bankCode`, `username` and `pin`. The methods can be chained in arbitrary order. If you have already specified some of those values in the config file you only need to fill the missing values.

```
use Fints;

...

$fints = Fints::username('my-username')->pin('my-secret-pin');

```

### 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()`. If the initalization is handled by the config, you would call the facade like so

```
use Fints;

...

$accounts = Fints::getAccounts()

```

This method returns a collection of your bank accounts, i.e. an array of instances of `Abiturma\PhpFints\Models\Account`, which behave similar to laravel model classes. In particular the have magic getters and can be transformed to an array using `->toArray()`.

### 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 `Carbon` objects to restrict the transactions to a specific date range: `$fints->getStatementOfAccount($account, $from, $to)`. The result is a collection of objects of type `Abiturma\PhpFints\Models\Transaction`, which behave similar to laravel models. In particular you can retrieve a list of all attributes by calling `->toArray()` on them.

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`

Customizing the account model
-----------------------------

[](#customizing-the-account-model)

If you have your own account model it is not necessary to call `->getAccounts()` first in order to get a statement of an account. Instead you can use your account model and make it implement `Abiturma\LaravelFints\IdentifiesBankAccount` by providing a method `getAccountAttributes()` which returns an array of the form

```
[
    'iban' => 'Iban of the according account',
    'bic' => 'Bic of the according account',
    'account_number' => 'AccountNumber of the according account',
    'bank_code' => 'BankCode of the according account'
]

```

For example an implementation could look like this

```
use Illuminate\Database\Eloquent\Model;
use Abiturma\LaravelFints\IdentifiesBankAccount;

class MyAccount extends Model implements IdentifiesBankAccount {

...

    public function getAccountAttributes() {

            return [
                 'iban' => $this->iban,
                 'bic' => $this->bic,
                 'account_number' => $this->account_number,
                 'bank_code' => $this->bank_code
            ]
    }

}

```

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

[](#compatibility)

The underlying hbci-library is work in progress and tested only with a small number of banks so far. [Here](https://github.com/abiturma/php-fints/blob/master/COMPATIBILITY.md) you can find a list of the tested banks.

Contribution
------------

[](#contribution)

I'm looking forward to your feedback and suggestions.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.5% 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/7cf1d6d8d7218eeace3f50fe0bd639ba0774f199124f3ad250aa63d117bebc95?d=identicon)[CookieMC337](/maintainers/CookieMC337)

---

Top Contributors

[![abiturma](https://avatars.githubusercontent.com/u/17247267?v=4)](https://github.com/abiturma "abiturma (22 commits)")[![CookieMC337](https://avatars.githubusercontent.com/u/51511368?v=4)](https://github.com/CookieMC337 "CookieMC337 (3 commits)")[![koona-labs](https://avatars.githubusercontent.com/u/124568679?v=4)](https://github.com/koona-labs "koona-labs (2 commits)")

### Embed Badge

![Health badge](/badges/cookiemc337-laravel-fints/health.svg)

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

PHPackages © 2026

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