Go to file
dankito bf17bde9f5 Bumped version to 1.0.0-Alpha-16-SNAPSHOT 2024-10-16 01:36:35 +02:00
SampleApplications Renamed otherPartyBankCode to otherPartyBankId 2024-09-08 22:17:16 +02:00
docs Adjusted names according to English Translation of DFÜ-Abkommen Anlage_3_Datenformate_V3.8.pdf (Appendix_3-Data_Formats_V3-8.pdf) 2024-09-05 18:15:42 +02:00
fints4k Little refactoring 2024-10-15 21:55:16 +02:00
gradle/wrapper Updated Gradle version 2024-08-17 03:38:44 +02:00
tools Removed BankFinder code after moving them to a separate project 2022-02-18 22:59:39 +01:00
.gitignore Centralized configuring kotlinx-serialization plugin 2024-08-19 23:08:56 +02:00
LICENSE.md Added license 2022-02-07 00:17:52 +01:00
README.md Bumped version to 1.0.0-Alpha-13 2024-09-17 17:35:09 +02:00
build.gradle Bumped version to 1.0.0-Alpha-16-SNAPSHOT 2024-10-16 01:36:35 +02:00
gradle.properties Updated klf version 2024-09-19 05:05:01 +02:00
gradlew Initial commit 2019-10-02 19:54:11 +02:00
gradlew.bat Initial commit 2019-10-02 19:54:11 +02:00
settings.gradle.kts Added Toolchain resolver 2024-08-23 12:11:22 +02:00

README.md

fints4k

fints4k is an implementation of the FinTS 3.0 online banking protocol used by most German banks.

It's fast, easy extendable and running on multiple platforms: JVM, Android, (iOS, JavaScript, Windows, MacOS, Linux).

Features

  • Retrieving account information, balances and turnovers (Kontoumsätze und -saldo).
  • Transfer money and real-time transfers (SEPA Überweisungen und Echtzeitüberweisung).
  • Supports TAN methods chipTAN manual, Flickercode, QrCode and Photo (Matrix code), pushTAN, smsTAN and appTAN.

However, this is quite a low level implementation and in most cases not what you want to use.
In most cases you want to use a higher level abstraction like FinTs4kBankingClient.

Setup

Not uploaded to Maven Central yet, will do this the next few days!

Gradle:

repositories {
    mavenCentral()
    maven {
        setUrl("https://maven.dankito.net/api/packages/codinux/maven")
    }
}


dependencies {
    implementation("net.codinux.banking:fints4k:1.0.0-Alpha-13")
}

Maven:


// add Repository https://maven.dankito.net/api/packages/codinux/maven

<dependency>
   <groupId>net.dankito.banking</groupId>
   <artifactId>fints4k-jvm</artifactId>
   <version>1.0.0-Alpha-11</version>
</dependency>

Usage

Quite outdated, have to update it. In most cases use FinTs4kBankingClient.

See e.g. JavaShowcase or FinTsClientTest.

    // Set your bank code (Bankleitzahl) here.
    // BankInfo contains e.g. a bank's FinTS server address, country code and BIC (needed for money transfer)
    List<BankInfo> foundBanks = new InMemoryBankFinder().findBankByNameBankCodeOrCity("<bank code, bank name or city>");

    if (foundBanks.isEmpty() == false) { // please also check if bank supports FinTS 3.0
        BankData bank = new BankDataMapper().mapFromBankInfo(foundBanks.get(0));

        // set your customer data (customerId = username you use to log in; pin = online banking pin / password)
        CustomerData customer = new CustomerData("<customer_id>", "<pin>");

        FinTsClientCallback callback = new SimpleFinTsClientCallback(); // see advanced showcase for configuring callback

        FinTsClient finTsClient = new FinTsClient(callback, new Java8Base64Service());

        AddAccountResponse addAccountResponse = finTsClient.addAccount(bank, customer);

        if (addAccountResponse.isSuccessful()) {
            System.out.println("Successfully added account for " + bank.getBankCode() + " " + customer.getCustomerId());

            if (addAccountResponse.getBookedTransactions().isEmpty() == false) {
                System.out.println("Account transactions of last 90 days:");
                showGetTransactionsResponse(addAccountResponse);
            }
        }
        else {
            System.out.println("Could not add account for " + bank.getBankCode() + " " + customer.getCustomerId() + ":");
            showResponseError(addAccountResponse);
        }

        // see advanced show case what else you can do with this library, e.g. retrieving all account transactions and transferring money
    }

Logging

fints4k uses slf4j as logging facade.

So you can use any logger that supports slf4j, like Logback and log4j, to configure and get fints4k's log output.

Sample applications

WebApp

Directly requesting bank servers is forbidden in browsers due to CORS.

In order to use fints4k directly in browser you need a CORS proxy like the one from CorsProxy Application.kt or https://github.com/Rob--W/cors-anywhere.

Set CORS proxy's URL in WebApp main.kt.

Start sample WebApp then with

 ./gradlew WebApp:run --continuous

License

Not free for commercial applications. More details to follow or contact us.