Sign inSign up

gared/firefly-iii-fints-console-importer

By gared

•Updated 4 days ago

Importer for Firefly III to import transaction via FinTS

Image
0

2.0K

gared/firefly-iii-fints-console-importer repository overview

⁠FinTS Console Importer for Firefly III

Import your bank transactions into Firefly III⁠ using the FinTS⁠ protocol (used by most German banks).

What does this tool do?

  • Connects to your bank via the FinTS protocol
  • Fetches your bank transactions for a given time period
  • Maps and imports the transactions into your Firefly III instance
  • Persists the FinTS session state to avoid unnecessary re-authentication
  • Supports multiple bank accounts via separate configuration files

⁠Requirements

You need PHP 8.5 or higher to run this tool.

⁠Setup

⁠1. Generate a configuration file

Before you can run the importer, you need to generate a configuration file for your bank account. This will also create a state file to persist the FinTS session state (which is required to run the importer). Run the interactive setup wizard:

bin/console config:generate

You will be prompted for the following information:

  • FinTS API URL of your bank (e.g. https://fints.ing.de/fints/)
  • Bank code (BLZ)
  • Your online banking username and password
  • Your Firefly III instance URL and personal access token
  • TAN mode and TAN medium (if required by your bank)
  • The Firefly III asset account to import into

The configuration file will be saved to the data/config/ directory.

⁠2. Validate the configuration file (optional)

You can verify that a configuration file is valid before running the importer:

bin/console config:validate data/config/mybank.json
⁠3. Run the importer
bin/console import-transactions --config data/config/mybank.json

⁠Usage

⁠Docker

Run the application using the official Docker image:

docker run --rm -v data_directory:/app/data/ gared/firefly-iii-fints-console-importer bin/console import-transactions --config data/config/mybank.json

Or build the image manually:

docker build -f docker/Dockerfile -t firefly-fints-importer .
docker run --rm -v $(pwd)/data:/app/data firefly-fints-importer bin/console import-transactions --config data/config/mybank.json
⁠Clone

Clone this repository and install dependencies:

git clone https://github.com/gared/firefly-iii-fints-console-importer.git
cd firefly-iii-fints-console-importer
composer install

Then run the importer:

bin/console import-transactions --config data/config/mybank.json

⁠Configuration file

The configuration file is a JSON file located in data/config/. It is generated interactively via config:generate and contains the following fields:

FieldDescription
bank_usernameYour online banking username
bank_passwordYour online banking password
bank_codeBank code (BLZ)
bank_urlFinTS API URL of your bank
bank_2faTAN mode (e.g. NoPsd2TanMode or a specific TAN method ID)
bank_2fa_deviceTAN medium / device name (if required)
firefly_urlURL of your Firefly III instance
firefly_access_tokenPersonal access token for Firefly III
choose_account_automation.bank_account_ibanIBAN of the bank account to import from
choose_account_automation.firefly_account_idID of the Firefly III asset account to import into
choose_account_automation.fromStart date for the import (e.g. now - 2 days)
choose_account_automation.toEnd date for the import (e.g. now)

The config is fully compatible with https://github.com/bnw/firefly-iii-fints-importer⁠, but doesn't use all config values.

⁠Available commands

CommandDescription
config:generateInteractively generate a new configuration file
config:validate <file>Validate an existing configuration file
import-transactions --config <file>Run the importer with the given configuration file

⁠Development

Install all dependencies including dev dependencies:

composer install

Run the test suite:

vendor/bin/phpunit

Run static analysis:

vendor/bin/phpstan

Run code style fixer:

vendor/bin/php-cs-fixer fix

Tag summary

Content type

Image

Digest

sha256:999f8eee8…

Size

232.1 MB

Last updated

4 days ago

docker pull gared/firefly-iii-fints-console-importer