iban library

Pakistani IBAN validation and bank lookup.

Same as the pakdatakit/iban entry point of the npm package.

Classes

BankInfo
A bank (or other institution) that issues Pakistani IBANs.

Enums

BankType
Kind of institution that issues Pakistani IBANs.

Functions

getBankFromIBAN(String iban) → String?
Returns the bank name for a valid Pakistani IBAN from its 4-letter bank code, or null if the IBAN is invalid or the code is not in the dataset.
getBankInfo(String ibanOrCode) → BankInfo?
Returns details of the bank that issued an IBAN: name, type (commercial, Islamic, microfinance, digital bank, wallet …) and whether it still exists. Also accepts a 4-letter bank code on its own, such as MEZN.
getBanks() → List<BankInfo>
Lists every bank code in the dataset, sorted by code, including merged banks and older alias codes. Filter it for a bank picker, e.g. getBanks().where((b) => b.active && b.aliasOf == null).
validateIBAN(String iban) → bool
Validates a Pakistani IBAN: format and ISO 13616 mod-97 checksum.