Skip to content

jelveby/bankverify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aba5352 · Nov 21, 2018

History

81 Commits
Apr 6, 2017
Nov 21, 2018
May 31, 2016
May 25, 2016
May 25, 2016
Apr 6, 2017
Apr 6, 2017
Nov 21, 2017
May 26, 2016
Apr 6, 2017
Nov 21, 2018
Nov 21, 2018
May 26, 2016
May 26, 2016

Repository files navigation

Bankverify

I needed a way to do a quick verification of Swedish bank accounts. Supports personal accounts from a wide variety of banks, Bankgiro as well as Plusgiro.

Heavily influenced by https://github.com/barsoom/banktools-se

Usage

Personal accounts

let account = BankVerify.init('8323-6 988.123.838-4', 'account');
let accountNumber = accunt.getAccountNumber() // 8323-6 988.123.838-4
let bank = account.bank() // Swedbank
let clearingNumber = account.clearingNumber() // 8323-6
let serialNumber.serialNumber() // 9881238384
let normalized = account.normalize() // 8323-6 988.123.838-4
let valid = account.valid() // false

Bankgiro

let account = BankVerify.init('5402--9681', 'bankgiro');
let number = accunt.getNumber() // 5402--9681
let normalized = account.normalize() // 5402-9681
let isFundraising = account.fundraising() // false (Needs to be 900-nnnn to 904-nnnn)
let valid = account.valid() // true

Plusgiro

let account = BankVerify.init('2865434', 'plusgiro');
let number = accunt.getNumber() // 2865434
let normalized = account.normalize() // 28 65 43-4
let isFundraising = account.fundraising() // false (Needs to be 90-NNNN)
let valid = account.valid() // true

About

Simple library to verify Swedish bank accounts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published