> For the complete documentation index, see [llms.txt](https://docs.pezesha.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pezesha.com/loan-history.md).

# Loan History

## Get Loan History

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/mfi/v1/borrowers/statement`

Get a merchant's loan history

#### Headers

| Name                                            | Type   | Description                     |
| ----------------------------------------------- | ------ | ------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token from AUTH endpoint |

#### Request Body

| Name                                             | Type   | Description         |
| ------------------------------------------------ | ------ | ------------------- |
| identification<mark style="color:red;">\*</mark> | String | Borrower identifier |
| page                                             | int    | Page of statements  |

{% tabs %}
{% tab title="200: OK Request successful" %}

```javascript
{
    "status": 200,
    "response_code": 0,
    "error": false,
    "message": "Loans Records Found",
    "data": [
        {
            "loan_id": 102872,
            "loan_amount": "10.00",
            "app_interest_value": "2.00",
            "app_service_value": "0.00",
            "app_penalty_value": "0.00",
            "loan_status": "Paid",
            "mpesa_time": "2021-10-26 14:43:56",
            "loan_date": "2021-10-26",
            "loan_duedate": "2021-11-25",
            "amount_due": 0,
            "overduedays": 0,
            "penalty": 0,
            "amount_principal": "10.00",
            "amount_expected": 12,
            "amount_repaid": 12,
            "amount_balance": 0,
            "penalty_expected": 0,
            "penalty_repaid": 0,
            "penalty_balance": 0,
            "net_balance": 0
        }
    ]
}
```

{% endtab %}

{% tab title="404: Not Found Unable to find loan history" %}

```javascript
{
    "status": 404,
    "response_code": 0,
    "error": true,
    "message": "No Loans Records Found"
}
```

{% endtab %}
{% endtabs %}
