{"id":13509358,"url":"https://github.com/my-flow/mt940","last_synced_at":"2025-10-21T18:51:05.078Z","repository":{"id":31440061,"uuid":"35003704","full_name":"my-flow/mt940","owner":"my-flow","description":"MT940 parser for Elixir","archived":true,"fork":false,"pushed_at":"2016-11-27T20:04:18.000Z","size":102,"stargazers_count":9,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-19T09:46:28.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/my-flow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-03T22:56:25.000Z","updated_at":"2023-09-01T12:08:01.000Z","dependencies_parsed_at":"2022-09-09T12:22:46.189Z","dependency_job_id":null,"html_url":"https://github.com/my-flow/mt940","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/my-flow%2Fmt940","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/my-flow%2Fmt940/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/my-flow%2Fmt940/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/my-flow%2Fmt940/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/my-flow","download_url":"https://codeload.github.com/my-flow/mt940/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246323970,"owners_count":20759058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:06.613Z","updated_at":"2025-10-21T18:51:04.719Z","avatar_url":"https://github.com/my-flow.png","language":"Elixir","funding_links":[],"categories":["Text and Numbers"],"sub_categories":[],"readme":"MT940/MT942 parser for Elixir\n=============================\n\n[![Build Status](https://travis-ci.org/my-flow/mt940.svg?branch=master)](https://travis-ci.org/my-flow/mt940)\n[![Coverage Status](https://coveralls.io/repos/my-flow/mt940/badge.svg?branch=master)](https://coveralls.io/r/my-flow/mt940?branch=master)\n[![Hex.pm](https://img.shields.io/hexpm/v/mt940.svg)](https://hex.pm/packages/mt940)\n[![Inline docs](http://inch-ci.org/github/my-flow/mt940.svg)](http://inch-ci.org/github/my-flow/mt940)\n\nThis is a library to parse MT940 and MT942 account statements. It was ported from Ruby and is based on\n[Thies C. Arntzen's mt940 library](https://github.com/betterplace/mt940_parser).\nThe MT94x category of SWIFT messages are meant for customer statements and cash management:\n- **MT940** is the standard structured _Customer Statement Message_ format (end-of-day statement file which details all entries booked to a bank account). Usually you receive a customer statement message the next morning of the day of business.\n- **MT942** is the standard structured _Interim Transaction Report_ format. MT942 gives a report of the debits/credits any given time of the day.\n\n## Basic usage\n\nInclude a dependency in your `mix.exs`:\n\n```elixir\ndeps: [{:mt940, \"~\u003e 1.1.2\"}, …]\n```\n\n`use MT940` and `parse!` the raw input:\n\n```elixir\ndefmodule BankAccount do\n  use MT940\n\n  def balance(raw) when is_binary(raw) do\n    %{amount: amount, currency: currency} = raw\n    |\u003e parse!\n    |\u003e Enum.at(-1)\n    |\u003e MT940.CustomerStatementMessage.closing_balance\n    \"#{amount} #{currency}\"\n  end\n\n  def transactions(raw) when is_binary(raw) do\n    raw\n    |\u003e parse!\n    |\u003e Enum.flat_map(\u0026MT940.CustomerStatementMessage.statement_lines/1)\n  end\nend\n```\n\nIf you want to have a more detailed, low-level list of MT940 commands, use the\n`MT940.Parser.parse!` command.\n\n\n## Specification\n\nFind the specification in the [MT940 Format Overview](http://www.sepaforcorporates.com/swift-for-corporates/account-statement-mt940-file-format-overview/)\nor in the [SWIFT MT 940 Customer Statement Message Report](http://martin.hinner.info/bankconvert/swift_mt940_942.pdf).\n\n\n## Documentation\n\nAPI documentation is available at [http://hexdocs.pm/mt940](http://hexdocs.pm/mt940).\n\n\n## Copyright \u0026 License\n\nCopyright (c) 2015-2016 [Florian J. Breunig](http://www.my-flow.com)\n\nLicensed under MIT, see LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmy-flow%2Fmt940","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmy-flow%2Fmt940","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmy-flow%2Fmt940/lists"}