This package easily validates and returns details about Swedish bank account numbers using JavaScript. The details and validation rules are based on the documentation provided by Bankgirot, which can be found here.
npm install se-bank-account
Enter the account number including clearing number in any format (string or integer) to get information about the account number such as the name of the bank, clearing number, and account number. If an account number is invalid it will return false
.
Get information about a valid account number:
const { account } = require 'se-bank-account';
// Returns an object if valid, otherwise it returns false.
const acc = account('3300-7505092556');
acc.bank // Nordea Personkonto
acc.clearing // 3300
acc.number // 7505092556
Using an invalid account number:
const { account } = require 'se-bank-account';
const acc = account('0000-0000000'); // false
Following Swedish banks are currently supported:
- Avanza Bank
- BNP Paribas SA
- Bankgirot
- BlueStep Finans
- DNB Bank
- Danske Bank
- Ekobanken
- Erik Penser
- Forex Bank
- Handelsbanken
- IKANO Bank
- Ica Banken
- JAK Medlemsbank
- Klarna Bank
- Landshypotek
- Länsförsäkringar Bank
- Lån & Spar Bank Sverige
- Marginalen Bank
- MedMera Bank
- Nordax Bank
- Nordea
- Nordnet Bank
- Northmill Bank
- Plusgirot
- Resurs Bank
- Riksgälden
- SBAB
- SEB
- Santander Consumer Bank
- Skandiabanken
- Sparbanken Syd
- Svea Bank
- Swedbank
- Swedbank fd. Sparbanken Öresund
- Ålandsbanken Sverige AB
If you find a bug or a bank that might not be supported, please submit an issue on Github directly under issues.
Any contributions are welcome!