Developers: Gem for Automated Parsing of Bank Account Numbers

Developers: Gem for Automated Parsing of Bank Account Numbers

April 24, 2015 · 2 min read

Banks, Branches, and Accounts

If you’re a developer who has built, or is currently managing your company’s HR or payroll system on the back-end, you might be familiar with banks, branches, and accounts. In this article, we show you how to do automated parsing of bank account numbers for your company’s payroll system.

The three fit together on the premise of the Bank Account model, which allows you to monitor the bank accounts and grant access to either users, departments, or businesses.

 

Changes in Singapore’s Interbank GIRO Infrastructure

For those of you who haven’t already read our post on Singapore’s Interbank GIRO Infrastructure Upgrade March 2015, note that banks are no longer using branch codes to process GIRO transactions. This means that you simply need to key in your account number.

However, for all HSBC, OCBC and State Bank of India (SBI) corporate customers, you will still need to key in the branch code into the account number field after the upgrade.

 

We’ve made things easier for you

The Talenox suite of applications are built with Ruby on Rails and AngularJS.

Our talented developer, Sherwyn, has created a gem which allows you to provide a bank name and account number, automatically generating the branch code, bank code, and branch name.

Note that this applies to Singapore banks only. Currently serviced banks are: [‘OCBC’, ‘DBS’, ‘UOB’, ‘FEB’, ‘POSB’, ‘HSBC’, ‘Standard Chartered’, ‘CITIBANK’, ‘Malayan Banking Berhad’].

The purpose of the gem is for automated parsing of bank account numbers into the respective branch codes, bank codes, and resolving the final account number, which varies from bank to bank. Banks like UOB have acquired other bank(s), and the resulting bank code and branch names/codes differ greatly.

 


Installation

Add this line to your application’s Gemfile:

gem'SingaporeBankCodes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install SingaporeBankCodes

 

Usage

resolver = BankCodeResolver.new(name: ‘POSB’, number: ‘123456789’)
resolver.get_result

returns a hash with keys bank_code, branch_code, branch_name and resolved account number, which can be different from supplied account number

BankCodeResolver.bank_options #for possible bank names

 

Contibuting

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

 

See more at Sherwyn’s github: https://github.com/sherwyngoh/SingaporeBankCodes

 


If you enjoyed reading this, you may be interested in:

How to Setup Static IP on Heroku
How to Integrate Heroku Status Alerts into Slack

Subscribe to our newsletter

Get the latest HR tips, guides, and updates delivered to your inbox.

BACK TO TOP