A pure ruby HBCI client for talking with german banks
This gem is considered experimental.
Add this line to your application's Gemfile:
gem 'hbci'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hbci
First, setup your credentials in a BankCredentials::Hbci
instance:
credentials = BankCredentials::Hbci.new({
url: 'url',
bank_code: 'bank_code',
user_id: 'user_id',
pin: 'pin'
})
Now, you can receive your balances, accounts and transactions:
iban = 'DE05740900000011111111'
start_date = 3.day.ago
end_date = Time.now
Hbci::Connector.open(credentials) do |connector|
Hbci::Dialog.open(connector) do |dialog|
transactions = Hbci::Services::TransactionsReceiver.new(connector, dialog, iban).perform(start_date, end_date)
transactions.each do |transaction|
puts transaction
end
end
end
iban = 'DE05740900000011111111'
Hbci::Connector.open(credentials) do |connector|
Hbci::Dialog.open(connector) do |dialog|
puts Hbci::Services::BalanceReceiver.new(connector, dialog, iban).perform
end
end
Hbci::Connector.open(credentials) do |connector|
Hbci::Dialog.open(connector) do |dialog|
accounts = Hbci::Services::AccountsReceiver.new(dialog).perform
accounts.each do |account|
puts account
end
end
end
Bank | Tested | HBCI URL |
---|---|---|
VR Bank | DONE | https://hbci11.fiducia.de/cgi-bin/hbciservlet |
Postbank | DONE | https://hbci.postbank.de/banking/hbci.do |
Consorsbank | DONE | https://brokerage-hbci.consorsbank.de/hbci |
Hypovereinsbank | OPEN | https://hbci-01.hypovereinsbank.de/bank/hbci |
After checking out the repo, run bin/setup
to install dependencies. Then, run rake rspec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/fintastic/hbci
- FinTS 3.0 Formals
- FinTS 3.0 Messages
- FinTS 3.0 Sicherheitsverfahren
- FinTS 3.0 Pin/Tan Sicherheitsverfahren
The gem is available as open source under the terms of the MIT License.