# Financing Fetch active financing deals. Unlike other data endpoints, this returns an HTML page — deal data is embedded in `data-*` attributes on card elements. --- ## Endpoint ``` GET https://faisamobilex-wv.mib.com.mv/financing?dashurl=1 ``` --- ## Authentication See [README](README.md) for cookie format. ### Additional Header | Header | Value | |---|---| | `X-Requested-With` | `mv.com.mib.faisamobilex` | Note: this endpoint uses the app package name as `X-Requested-With`, not `XMLHttpRequest`. --- ## Response **Content-Type:** `text/html; charset=UTF-8` Each financing deal is a `
` with class `finance-card-holder` and all fields as `data-*` attributes: ```html
``` ### Data Fields | Attribute | Type | Description | |---|---|---| | `productDesc` | String | Product name (e.g. `"Ujalaa CG Finance"`) | | `dealStatus` | String | Status code (`P` = Active/Pending) | | `statusDesc` | String | Human-readable status (e.g. `"Approved"`) | | `dealAmount` | Decimal | Total financing amount | | `dealNo` | Integer | Unique deal/contract number | | `paidAmount` | Decimal | Amount paid to date | | `outstandingAmount` | Decimal | Remaining unpaid balance | | `dealDate` | String | Contract start date (`yyyy-MM-dd HH:mm:ss`) | | `overdueAmount` | Decimal | Amount currently overdue (`0` if none) | | `installmentAmount` | Decimal | Monthly installment amount | | `noOfInstallments` | Integer | Total number of installments | | `lastPaidDate` | String | Date of most recent payment (`yyyy-MM-dd HH:mm:ss`) | | `lastPayAmount` | Decimal | Amount of most recent payment | | `financeCurrency` | Integer | Currency numeric code (`462` = MVR) | | `curCodeDesc` | String | Currency abbreviation (e.g. `"MVR"`) | ### Parsing ```kotlin val cardPattern = Regex("""finance-card-holder[^>]+>""") val attrPattern = Regex("""data-(\w+)\s*=\s*"([^"]*)"""") ``` Find all `finance-card-holder` elements, then extract `data-*` key/value pairs from each match. --- ## Completion Date Estimation ``` remainingInstallments = ceil(outstandingAmount / installmentAmount) completionDate = today + remainingInstallments months ``` --- ## Notes - No encryption — session maintained purely via cookies. - The response is gzip/brotli compressed; OkHttp handles decompression automatically. - `time-tracker=597` appears static — omitting it may affect behavior. ---   --- [← Cards](05-cards.md)     **Next →** [Personal Profile](07-profile.md)