Epics - the epic EBICS client

a full ruby implementation of EBICS

View the Project on GitHub railslove/epics

Railslove provides consulting and development services for innovative financial applications - take a look at our portfolio: railslove.com/portfolio

Feel free to contact us if you need help: team@railslove.com

Build Status Gem Version

Epics

EPICS is a ruby implementation of the EBICS (Electronic Banking Internet Communication Standard)

The client support the complete initialization process comprising INI, HIA and HPB including the INI letter generation. It offers support for the most common download and upload order types (STA HAA HTD HPD PKT HAC HKD C52 C53 CD1 CDD CCT)

Installation

Add this line to your application's Gemfile:

gem 'epics'

Or install it yourself as:

$ gem install epics

Getting started

In case you are new to EBICS, you'll have to complete a initialization process with your bank. Epics can help you to generate all the necessary keys and directly store them for later use, but first you'll have to to lift some contractually work with your bank.

Once the paperwork is done, your bank should provide you with:

Take this parameters and start setting up one UserID (repeat this for every user you want to initialize):

e = Epics::Client.setup("my-super-secret", "https://ebics.sandbox", "SIZBN001", "EBIX", "EPICS")

To use the keys later, just store them in a file

e.save_keys("/home/epics/my.key")
# or store the json elsewhere, but store it! for gods sake :D

It is really important to keep your keys around, once your user has been initialized you'll have to start over when you loose the keys!

Submit the keys to your bank:

e.INI # sends the signature key

e.HIA # sends the encryption and authentication keys

The next step is to print the INI letter and post it to your bank:

e.save_ini_letter( 'My Banks Name', "/home/epics/ini.html" )

Open the generated HTML file in your favorite browser and print it out (skipping header and footer sounds like a solid setting here ;) In case your having difficulties with the encoding, try forcing your browser to use UTF-8.

Put the INI letter in a envelope and mail it to your bank!

Done! ... Well not completly :)

Once the bank confirms that your user is completely initialized. You'll have to download the public keys of your bank:

### see below for client creation
e.HPB

Then again, save the keys or store the json somewhere safe.

You're now ready to go. Maybe try:

e.HAA

To get a list of all supported order types.

Need help? Having questions?

We have many years of experience in developing innovative applications for the finance sector and integration application with financial institutions. - you might want to have a look at our portfolio
If you need help we are happy to provide consulting or development services. Contact us: team@railslove.com

Usage

Create a client

# read the keys from a file
e = Epics::Client.new(File.open('/tmp/my.key'), 'passphrase', 'url', 'host', 'user', 'partner')

# or provide a string hoding the key data
keys = File.read('/tmp/my.key')

e = Epics::Client.new(keys, 'passphrase', 'url', 'host', 'user', 'partner')

Features

Initialization

Downloads

Currently this EPICS implementation supports the following order types:

Example:

puts e.STA('2014-09-01', '2014-09-11')
# result is a MT940 feed

:20:1
:25:/PL12124012551111000015237873
:28C:00152
:60F:C081130PLN000000002535,03
:61:0810021002DN000000001273,23N641NONREF
:86:641^00PRZELEW MI¨DZYBANKOWY BETA/^34000
^3019401076^38PL54194010765205871800000000
^20wynagrodzenie z tytulu umow^21y o prac e
^32BANKA MONIKA
^62PODCHORAZYCH 16/1580-298 GD^63ANSK
:61:0810021002DN000000001287,40N641NONREF
:86:641^00PRZELEW MI¨DZYBANKOWY BETA/^34000
^3010201909^38PL74102019090000310200475772
^20wynagrodzenie z tytulu umow^21y o prac e
^32SZCZACHOR DOROTA
^62RATAJA 13B/1083-032 PSZCZOL^63KI

Uploads

Example:

puts e.CD1("i-am-a-PAIN-xml-file")
# res is a the transaction id of the order

Lazy Mode

Once you have a client, go ahead and start playing! There are 3 convinence methods that are hiding some strange names from you:

If you need more sophisticated EBICS order types, please read the next section about the supported functionalities.

Issues and Feature Requests

Railslove is commited to provide the best developer tools for integrating with financial institutions. Epics is one of our many tools and services. If you are missing some features or something is not working as expected please create an issue.

Supported Banks

This gem provides a full implementation of the Electronic Banking Internet Communication Standard and works with any bank that supports this standard. Please ask your bank if they support EBICS and what order types are available.

Besides EBCIS being a standard, some server implementations are slighty different. Is Epics working with your institution? Please help us to grow this list of supported banks:

Links

Contributing

  1. Contact team@railslove.com for information about the CLA
  2. Fork it ( https://github.com/[my-github-username]/epics/fork )
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

2014 - built with love by Railslove and released under the GNU LESSER GENERAL PUBLIC LICENSE. We have built quite a number of FinTech products. If you need support we are happy to help. Please contact us at team@railslove.com.