# Loan and KPR Calculator

Annuity and flat installments — the monthly payment every bank and dealer quotes, and what each really costs in interest.

- Method: `GET`
- Path: `/v1/finance/loan`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `principal` | number | required | The amount borrowed. |
| `annual_rate` | number | required | Annual rate — decimal (0.11) or percent (11); values above 1 are read as percent. |
| `months` | integer | required | Tenure in months. |
| `method` | string | optional | `annuity` (default, what banks quote) or `flat` (what dealers quote). |

**Example request**

```bash
curl https://api.diraz.ae/v1/finance/loan \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "method": "flat",
    "monthly_payment": 9333333,
    "final_installment": 9333337,
    "total_payment": 112000000,
    "total_interest": 12000000
  },
  "meta": { "request_id": "req_7Q2fK4mZ" }
}
```