# getBankInfo

Source: https://pakdatakit.dev/api/typescript/iban/functions/getbankinfo/

```ts
function getBankInfo(ibanOrCode): BankInfo | null;
```

Defined in: [iban.ts:142](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/iban.ts#L142)

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.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `ibanOrCode` | `string` | A valid Pakistani IBAN, or a bank code such as `MEZN` |

## Returns

[`BankInfo`](https://pakdatakit.dev/api/typescript/iban/interfaces/bankinfo/) \| `null`

Bank details, or `null` if the IBAN is invalid or the code unknown

## Example

```ts
getBankInfo('PK36SCBL0000001123456702');
// { code: 'SCBL', name: 'Standard Chartered Bank (Pakistan) Limited',
//   type: 'commercial', active: true, mergedInto: null, aliasOf: null }
getBankInfo('SADA')?.type; // 'emi'
```
