8000 GitHub - lowks/fintex: Elixir-based client library for HBCI 2.2 and FinTS 3.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lowks/fintex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinTex

Build Status Coverage Status Hex.pm

An Elixir-based client library for HBCI 2.2 and FinTS 3.0.

In 1995 German banks announced a common online banking standard called Homebanking Computer Interface (HBCI). In 2003 they published the next generation and named it Financial Transaction Services (FinTS). Today more than 2,000 German banks support HBCI/FinTS.

This client library supports both APIs, HBCI 2.2 and FinTS 3.0. It can be used to read the balance of a bank account, receive an account statement, and make a SEPA payment using PIN/TAN.

Installation

Include a dependency in your mix.exs:

deps: [
  {:fintex, "~> 0.0.1"}
  {:ibrowse, tag: "v4.1.1", github: "cmullaparthi/ibrowse"},
  {:xml_builder, commit: "84c310903af9b80fc54829c88d2c4bc898a65233", github: "joshnuss/xml_builder"}
]

Usage

First and foremost you need bank-specific connection data of the bank you try to connect to (payment industry jargon: FinBanks). A full list of connection data can be obtained from the official DK website. Please keep in mind that these connection details are subject to change.

blz = "12345678"            # 8 digits bank code
url = "https://example.org" # URL of the bank server
version = "300"             # API version
bank = FinTex.Model.Bank.new(blz, url, version)

Ping

Some banks support the “anonymous login” feature, so you can send a ping request:

FinTex.ping(bank)

Retrieve a list of bank accounts

In order to retrieve account-specific data (such as an account's balance), you need credentials for a real-life bank account (usually login and PIN). Note that repeated failed attempts to log in might cause the bank to block the bank account.

login = "username"
pin = "secret"
FinTex.accounts(bank, login, pin)

Retrieve all transactions of a bank account

Request all transactions of one of the bank accounts:

FinTex.transactions(bank, login, pin, account) # retrieve a list of transactions

Making a SEPA payment

A bank account contains a list of supported TAN schemes each of which can be used to make a SEPA payment. Pick a sender bank account (see above), add the receiver bank account (IBAN/BIC) and define the details:

payment = %FinTex.Model.Payment{
  sender_account: %FinTex.Model.Account{
    iban:  "DE89370400440532013000",
    bic:   "COBADEFFXXX",
    owner: "John Doe"
  },
  receiver_account: %FinTex.Model.Account{
    iban:  "FR1420041010050500013M02606",
    bic:   "ABNAFRPPXXX",
    owner: "Jane Doe"
  },
  amount: Decimal.new("1.00"),
  currency: "EUR",
  purpose: "A new test payment",
  tan_scheme: %FinTex.Model.TANScheme{
    sec_func: "921"
  }
}

FinTex.initiate_payment(bank, login, pin, payment)

Documentation

API documentation is available at http://hexdocs.pm/fintex.

Specification

For exact information please refer to the German version of the specification. There is also an unauthorized English translation.

Copyright & License

Copyright (c) 2015 Florian J. Breunig

Licensed under MIT, see LICENSE file.

About

Elixir-based client library for HBCI 2.2 and FinTS 3.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%
0