Basic MT940 parser with implementations of Dutch banks
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

MT940 (Dutch banks only)

Gem Version

Travis CI

Code Climate

Code Climate

Basis parser for MT940 files, see MT940. This library is only meant for collecting the transactions. No bank statements or balance (previous or new) is determined.

The following Dutch banks are implemented with support for IBAN numbers:

  • ABN Amro
  • ING
  • Rabobank
  • Triodos


With the file name as argument:

file_name = '/Users/dovadi/Downloads/ing.940'

@transactions =

or with the file itself:

file_name = '/Users/dovadi/Downloads/ing.940'

file =

@transactions =
  • Independent of the bank, a transaction always consists of:

    • accountnumber (BBAN or IBAN)
    • bank (for example Ing, Rabobank etc )
    • date
    • amount (which is negative in case of a withdrawal)
    • description
    • contra account

    (Pre sepa: with the Rabobank the contra_account owner is extracted as well)

Running tests

bundle install

bundle exec rake test

Contributing to MT940

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.


Copyright (c) 2014 Frank Oxener. See LICENSE.txt for further details.