> 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/borrower-loan-repayment-schedule.md).

# Loan Repayment Schedule

The repayment schedule can be Daily, Weekly or Monthly depending on the partners agreement with Pezesha. A repayment schedule can have the following statuses

* **Active on Schedule** - the schedule is active and payment is on schedule
* **Paid** - the schedule has already been paid
* **Overdue** - the schedule is overdue i.e payment is late

{% hint style="info" %}
in the loan schedule response, 'month' is used as a placeholder i.e it can represent day, week or month depending on the the partners loan schedule agreement with pezesha
{% endhint %}

## Get Cakes

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/mfi/v1/borrowers/repayment-shedules`

Get user loan repayment schedule

#### Query Parameters

| Name                                           | Type   | Description                                             |
| ---------------------------------------------- | ------ | ------------------------------------------------------- |
| channel<mark style="color:red;">\*</mark>      | string | Client Name given by Pezesha                            |
| merchant\_id<mark style="color:red;">\*</mark> | string | Merchant id for whom to see the loan repayment schedule |

#### Headers

| Name                                             | Type   | Description                                                 |
| ------------------------------------------------ | ------ | ----------------------------------------------------------- |
| Authentication<mark style="color:red;">\*</mark> | string | Authentication token generated from Authentication endpoint |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "status": 200,
    "response_code": 0,
    "error": false,
    "message": "Loans Repayment Schedule",
    "data": [
        {
            "loan_id": 10101,
            "repayment_date": "2020-07-03",
            "month": 1,
            "principal_amount": 500,
            "interest_amount": 0,
            "penalty_amount": 0,
            "penalty_paid": 0,
            "total_due": 500,
            "total_outstanding": 1000,
            "balance": 500,
            "status": "Active on Schedule"
        },
        {
            "loan_id": 10101,
            "repayment_date": "2020-07-03",
            "month": 2,
            "principal_amount": 500,
            "interest_amount": 0,
            "penalty_amount": 0,
            "penalty_paid": 0,
            "total_due": 500,
            "total_outstanding": 500,
            "balance": 500,
            "status": "Active on Schedule"
        },
        {
            "loan_id": 10101,
            "repayment_date": "2020-07-04",
            "month": 3,
            "principal_amount": 500,
            "interest_amount": 0,
            "penalty_amount": 0,
            "penalty_paid": 0,
            "total_due": 500,
            "total_outstanding": 0,
            "balance": 500,
            "status": "Active on Schedule"
        }
        
    ]
}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{
    "status": 404,
    "response_code": 0,
    "error": true,
    "message": "Unable to find active loan tied to merchant"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pezesha.com/borrower-loan-repayment-schedule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
