update mib api docs
Auto Tag on Version Change / check-version (push) Successful in 6s

This commit is contained in:
2026-10-23 05:38:33 +05:00
parent 740030e061
commit 2764c6e452
10 changed files with 662 additions and 658 deletions
+74 -50
View File
@@ -1,41 +1,46 @@
# Transaction History
Fetch paginated transaction history for a single MIB account. Served from the WebView subdomain.
Fetch paginated transaction history for a single MIB account. Served from the encrypted API.
The account must belong to the **currently selected** profile — call `P47` for its profile first (see [03-accounts.md](03-accounts.md)).
---
## Endpoint
## Transaction History — `sfunc=n`, `routePath: A84`
**Key**: session key
**Request**:
```json
{
"sfunc": "n",
"xxid": "<session xxid>",
"data": {
"accountNo": "90101000000001000",
"start": 0,
"end": 19,
"includeCount": true,
"trxType": 0,
"sortTrx": "date",
"sortDir": "desc",
"nonce": "<computed nonce>",
"appId": "<appId>",
"sodium": "<random 20-bit int>",
"routePath": "A84",
"xxid": "<session xxid>"
}
}
```
POST https://faisamobilex-wv.mib.com.mv/ajaxAccounts/trxHistory
```
---
## Authentication
See [README](README.md) for cookie and AJAX header format.
```
Referer: https://faisamobilex-wv.mib.com.mv//accountDetails?trxh=1&dashurl=1&accountNo=<accountNo>
```
---
## Request Body (form-urlencoded)
| Field | Example | Description |
|---|---|---|
| `accountNo` | `90101000000001000` | Account number to fetch history for |
| `trxNo` | `` | Transaction number filter (empty = all) |
| `start` | `0` | First row (0-based, inclusive) |
| `end` | `19` | Last row (inclusive) |
| `includeCount` | `true` | Include `total_count` in response |
| `trxType` | `0` | Transaction type filter (`0` = all) |
| `sortTrx` | `date` | Sort field |
| `sortDir` | `desc` | Sort direction |
| `fromDate` | `` | From date filter (empty = no filter) |
| `toDate` | `` | To date filter (empty = no filter) |
| `start` | `1` | Start record index (1-based) |
| `end` | `20` | End record index (`start + pageSize - 1`) |
| `includeCount` | `1` | Include `total_count` in response |
### Pagination
@@ -43,9 +48,9 @@ Page size is 20. Compute `start`/`end` per page:
| Page | `start` | `end` |
|---|---|---|
| 1 | `1` | `20` |
| 2 | `21` | `40` |
| N | `(N-1)*20 + 1` | `N*20` |
| 1 | `0` | `19` |
| 2 | `20` | `39` |
| N | `(N-1)*20` | `N*20 - 1` |
Stop when total fetched equals `total_count` or `data` is empty.
@@ -56,25 +61,36 @@ Stop when total fetched equals `total_count` or `data` is empty.
```json
{
"success": true,
"responseCode": "1",
"reasonCode": "103",
"reasonText": "Trx History Retrieval Success!",
"total_count": "87",
"pos": "0",
"data": [
{
"trxNumber": "TXN20260516001",
"trxDate": "2026-05-16",
"descr1": "Transfer Debit",
"baseAmount": "-500.00",
"accountNo": "90101000000001000",
"curCode": "462",
"curCodeDesc": "MVR",
"benefName": "Mohamed Ali",
"trxNumber2": "FT20260516001"
},
{
"trxNumber": "TXN20260515001",
"trxDate": "2026-05-15",
"descr1": "Transfer Credit",
"baseAmount": "1000.00",
"curCodeDesc": "MVR",
"benefName": "",
"trxNumber2": ""
"trxNumber": "1-158043140-93434633-1",
"trxNumber2": "93434633",
"trxDate": "2026-05-16 15:10:25",
"trxValDate": "2026-05-16 00:00:00",
"absAmount": "500",
"baseAmount": "-500",
"foreignAmount": "-500",
"descr1": "Favara Transfer Web",
"descr2": "<reference>",
"descr3": "<details>",
"remarks": "<details>",
"trxType": "803",
"AddDate": "2026-05-16 15:10:25",
"bankCode": "1",
"bankName": "Maldives Islamic Bank",
"benefName": "BML - MOHAMED ALI",
"otherAccountNo": "-",
"fromAcc": null,
"imageHash": null,
"bankColor": "#FE860E"
}
]
}
@@ -84,19 +100,27 @@ Stop when total fetched equals `total_count` or `data` is empty.
|---|---|---|
| `success` | `bool` | `true` on success |
| `total_count` | `string` | Total transaction count — parse to `int` |
| `pos` | `string` | Echo of the requested start row |
| `data` | `array` | Transactions for this page |
### Transaction Object
| Field | Type | Description |
| Field | Consumed | Description |
|---|---|---|
| `trxNumber` | `string` | Unique transaction ID |
| `trxDate` | `string` | Transaction date (`YYYY-MM-DD`) |
| `descr1` | `string` | Transaction description — trim whitespace |
| `baseAmount` | `string` | Decimal string — **negative = debit, positive = credit** |
| `curCodeDesc` | `string` | Currency code (e.g. `"MVR"`, `"USD"`) |
| `benefName` | `string` | Counterparty name — blank or literal `"null"` means none |
| `trxNumber2` | `string` | Secondary reference; may be blank |
| `trxNumber` | yes | Unique transaction ID |
| `trxDate` | yes | Transaction timestamp (`yyyy-MM-dd HH:mm:ss`) |
| `descr1` | yes | Transaction description — trim whitespace |
| `foreignAmount` | yes | Amount in the **account's** currency — **negative = debit, positive = credit** |
| `curCodeDesc` | yes | Account currency (e.g. `"MVR"`, `"USD"`) |
| `benefName` | yes | Counterparty name — `null`, blank or literal `"null"` means none |
| `trxNumber2` | yes | Secondary reference; may be blank |
| `baseAmount` | server-only | Signed amount in MVR. Differs from `foreignAmount` on USD accounts. |
| `absAmount` | server-only | Unsigned MVR amount |
| `descr2` / `descr3` / `remarks` | server-only | Extra reference and narrative lines |
| `trxType` | server-only | Numeric transaction type (e.g. `800` Favara credit, `803` Favara transfer, `205` account-to-account) |
| `imageHash` | server-only | Counterparty image hash, fetchable via `P41` (see [07-profile.md](07-profile.md)) |
> On USD accounts `baseAmount` is the MVR equivalent — always use `foreignAmount` for the amount shown against the account.
---