All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 4s
176 lines
4.7 KiB
Markdown
176 lines
4.7 KiB
Markdown
# Account Validation
|
|
|
|
Resolve and validate a destination account before initiating a transfer. Two endpoints cover different account types:
|
|
|
|
- **BML / alias accounts** — `GET /api/mobile/validate/account/{input}` — resolves BML account numbers and PayMV aliases
|
|
- **MIB accounts** — `GET /api/mobile/favara/account-verification/{account}/MIB` — resolves MIB accounts via BML's Favara interbank network
|
|
|
|
---
|
|
|
|
## Validate BML Account or Alias
|
|
|
|
```
|
|
GET https://www.bankofmaldives.com.mv/internetbanking/api/mobile/validate/account/{input}
|
|
```
|
|
|
|
`{input}` is either a BML account number or a PayMV alias string (e.g. `"MALI"` or a phone number used as alias).
|
|
|
|
### Request
|
|
|
|
```bash
|
|
# Validate a BML account number
|
|
curl --request GET \
|
|
--url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/validate/account/7730000000001' \
|
|
--header 'Authorization: Bearer <access_token>' \
|
|
--header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
|
|
--header 'x-app-version: 2.1.44.348' \
|
|
--header 'Accept: application/json'
|
|
|
|
# Validate an alias
|
|
curl --request GET \
|
|
--url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/validate/account/MALI' \
|
|
--header 'Authorization: Bearer <access_token>' \
|
|
--header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
|
|
--header 'x-app-version: 2.1.44.348' \
|
|
--header 'Accept: application/json'
|
|
```
|
|
|
|
---
|
|
|
|
## Responses
|
|
|
|
The `validationType` in the response determines which transfer type to use.
|
|
|
|
### BML Account (`validationType: "BML"`) — use `IAT`
|
|
|
|
```json
|
|
{
|
|
"success": true,
|
|
"payload": {
|
|
"trnType": "IAT",
|
|
"validationType": "BML",
|
|
"account": "7730000000001",
|
|
"name": "Mohamed Ali",
|
|
"alias": "MALI",
|
|
"currency": "MVR"
|
|
}
|
|
}
|
|
```
|
|
|
|
| Field | Type | Description |
|
|
|---|---|---|
|
|
| `trnType` | `string` | Transfer type to use — `"IAT"` |
|
|
| `validationType` | `string` | `"BML"` |
|
|
| `account` | `string` | Resolved BML account number |
|
|
| `name` | `string` | Account holder name |
|
|
| `alias` | `string` | Alias (if any) — blank or `"null"` if none |
|
|
| `currency` | `string` | Account currency |
|
|
|
|
---
|
|
|
|
### PayMV Alias (`validationType: "alias"`) — use `QTR`
|
|
|
|
Returned when the input resolves to a PayMV alias (interbank quick transfer).
|
|
|
|
```json
|
|
{
|
|
"success": true,
|
|
"payload": {
|
|
"trnType": "QTR",
|
|
"validationType": "alias",
|
|
"CdtrAcct": {
|
|
"Acct": "7730000000001",
|
|
"FinInstnId": ""
|
|
},
|
|
"contact_name": "Mohamed Ali",
|
|
"currency": "MVR"
|
|
}
|
|
}
|
|
```
|
|
|
|
| Field | Type | Description |
|
|
|---|---|---|
|
|
| `trnType` | `string` | Transfer type to use — `"QTR"` |
|
|
| `validationType` | `string` | `"alias"` |
|
|
| `CdtrAcct.Acct` | `string` | Resolved account number |
|
|
| `CdtrAcct.FinInstnId` | `string` | BIC of the destination institution (blank for BML-to-BML) |
|
|
| `contact_name` | `string` | Account holder name |
|
|
| `currency` | `string` | Account currency |
|
|
|
|
> For `QTR` transfers, pass the **original alias input** as `creditAccount` (not the resolved account number), as the alias is what the server routes on.
|
|
|
|
---
|
|
|
|
### Failure
|
|
|
|
```json
|
|
{ "success": false }
|
|
```
|
|
|
|
Account or alias not found, or not eligible for transfer.
|
|
|
|
---
|
|
|
|
## Verify MIB Account (Favara)
|
|
|
|
```
|
|
GET https://www.bankofmaldives.com.mv/internetbanking/api/mobile/favara/account-verification/{account}/MIB
|
|
```
|
|
|
|
Verifies a Maldives Islamic Bank (MIB) account number via BML's Favara interbank network. Use the result for a `DOT` transfer.
|
|
|
|
### Request
|
|
|
|
```bash
|
|
curl --request GET \
|
|
--url 'https://www.bankofmaldives.com.mv/internetbanking/api/mobile/favara/account-verification/90101000000001000/MIB' \
|
|
--header 'Authorization: Bearer <access_token>' \
|
|
--header 'User-Agent: bml-mobile-banking/348 ({manufacturer}; Android {version}; {model})' \
|
|
--header 'x-app-version: 2.1.44.348' \
|
|
--header 'Accept: application/json'
|
|
```
|
|
|
|
### Response
|
|
|
|
```json
|
|
{
|
|
"success": true,
|
|
"account": "90101000000001000",
|
|
"name": "Mohamed Ali",
|
|
"agnt": "MIBVMVMV"
|
|
}
|
|
```
|
|
|
|
| Field | Type | Description |
|
|
|---|---|---|
|
|
| `success` | `bool` | `true` if the account exists and is reachable |
|
|
| `account` | `string` | MIB account number |
|
|
| `name` | `string` | Account holder name |
|
|
| `agnt` | `string` | BIC of MIB — send as the `bank` field in the [transfer](08-transfer.md) request |
|
|
|
|
### Failure
|
|
|
|
```json
|
|
{ "success": false }
|
|
```
|
|
|
|
Account not found or not accessible via Favara.
|
|
|
|
---
|
|
|
|
## Transfer Type Summary
|
|
|
|
| `validationType` / source | `trnType` to use | `bank` required |
|
|
|---|---|---|
|
|
| `"BML"` | `IAT` | No |
|
|
| `"alias"` | `QTR` | No |
|
|
| MIB (Favara) | `DOT` | Yes — `agnt` value from verification response |
|
|
|
|
---
|
|
|
|
|
|
|
|
---
|
|
|
|
[← Contacts](09-contacts.md) **Next →** [Foreign Limits](11-foreign-limits.md)
|