Generate Repayment Schedule API
The Generate Repayment Schedule API in Frappe Lending allows external applications to generate a proposed loan repayment schedule before loan creation. This schedule can be presented to borrowers to show expected repayment dates, principal amounts, interest amounts, total payments, and remaining loan balance.
The API calculates repayment details based on the selected loan product, loan amount, interest rate, tenure, and repayment frequency.
Did You Know?
The repayment schedule API helps lenders provide borrowers with payment estimates before final loan approval.
API Endpoint
GET /api/method/lending.api.get_repayment_schedule
Request Parameters
The API accepts loan details required to calculate the proposed repayment schedule.
{
"loan_product": "Term Loan Product 4",
"loan_amount": 25000,
"rate_of_interest": 12,
"tenure": 6,
"repayment_frequency": "Monthly"
}
Request Parameters Description
| Parameter | Description |
|---|---|
| Loan Product | Defines the loan product used for repayment calculation. |
| Loan Amount | Specifies the amount borrowed by the applicant. |
| Rate of Interest | Defines the interest rate applicable to the loan. |
| Tenure | Defines the repayment duration of the loan. |
| Repayment Frequency | Defines how often repayments are scheduled, such as Monthly. |
Response
The API returns the calculated repayment schedule along with loan details and repayment periods.
{
"message": {
"loan_amount": 25000.0,
"rate_of_interest": 12.0,
"tenure": 6,
"repayment_start_date": "2026-02-27",
"repayment_periods": [
{
"payment_date": "2026-02-27",
"principal_amount": 4314.0,
"interest_amount": 0.0,
"total_payment": 4314.0,
"balance_loan_amount": 20686.0
}
]
}
}
Response Fields
| Field | Description |
|---|---|
| Loan Amount | Displays the loan amount used for schedule calculation. |
| Rate of Interest | Shows the interest rate applied to the loan. |
| Tenure | Displays the repayment duration. |
| Repayment Start Date | Shows the date on which the first repayment is scheduled. |
| Payment Date | Displays the scheduled repayment date for each installment. |
| Principal Amount | Shows the principal component of each repayment. |
| Interest Amount | Shows the interest component included in each repayment. |
| Total Payment | Displays the total repayment amount for the installment. |
| Balance Loan Amount | Shows the remaining outstanding loan balance after each repayment. |
Repayment Schedule Calculation
The API generates repayment periods based on the configured loan details.
| Calculation Component | Description |
|---|---|
| Principal Allocation | Shows the portion of repayment applied toward reducing loan principal. |
| Interest Calculation | Calculates interest payable based on the configured rate. |
| Total Repayment | Combines principal and interest amounts for each repayment period. |
| Outstanding Balance | Updates the remaining loan amount after every repayment. |
Use Cases
The repayment schedule API can be used in various lending workflows:
- Displaying repayment estimates during loan application.
- Showing borrowers expected EMI or installment details.
- Building loan calculators in external applications.
- Providing repayment information before loan approval.
Note
The generated schedule is a proposed repayment plan and can be used for borrower communication before the final loan is created.
Best Practices
- Validate loan product configuration before generating schedules.
- Use the same interest and repayment parameters planned for the actual loan.
- Display repayment details clearly to borrowers before approval.
- Recalculate the schedule if loan terms change.