Half Monthly Repayment Frequency Support for Mifos loan module

Half Monthly Repayment Frequency Support for Mifos loan module

Half Monthly

Goal

Introduce support for Half-Monthly (Semi-Monthly) repayment schedules in Apache Fineract, allowing repayments to occur twice every month on predefined dates.

Currently, Apache Fineract supports repayment frequencies such as:

  • Daily

  • Weekly

  • Bi-Weekly (every 2 weeks)

  • Monthly (1, 2, 3... months)

  • Yearly

However, it does not support repayments that occur twice within the same calendar month (for example, on the 1st & 15th or 15th & Last Day of Month).

This enhancement introduces a new repayment frequency specifically designed for semi-monthly lending products.

Business Requirement

Many payroll loans, salary advances, consumer loans, and working capital products require repayments aligned with payroll cycles.

Examples:

  • 1st and 15th of every month

  • 15th and last day of every month

  • 10th and 25th every month

These schedules cannot be achieved using existing configurations like:

  • 15-day intervals (drifts over time)

  • Bi-weekly schedules (26 payments/year)

  • Monthly schedules

Semi-monthly schedules always generate 24 repayments per year.

Current Limitation

Current repayment frequency configuration:

Frequency Type

Multiplier

Frequency Type

Multiplier

Days

1+

Weeks

1+

Months

1+

Years

1+

For monthly frequency:

Every X Months

Minimum value:

1 Month

There is no way to specify

0.5 Month

or

Twice Monthly

 

Functional Requirement

Introduce a new repayment frequency type instead of attempting to support 0.5 month.

New Field

Value

New Field

Value

Repayment Frequency Type

Half-Monthly

New Frequency Configuration for Half-Monthly:

Field

Description

Field

Description

First repayment day

Day 1-28

Second repayment day

Day 2-28 OR Last Day

Validation Rules

Rule 1

Second repayment day must be greater than first repayment day.

Example:

10 & 25 ✔ Valid
25 & 10 ✘ Invalid

Rule 2

Second repayment Dates must be between

1–28 or Last Day

Supporting 29/30/31 requires end-of-month adjustments.


Rule 3

Duplicate dates are not allowed.

15 & 15 ✘ Invalid

Rule 4

When "Last Day" is configured

System automatically uses:

  • 28 Feb

  • 29 Feb (Leap)

  • 30 Apr

  • 31 Jul


Rule 5

Leap Year

Configuration

15 Last Day

Produces

15-Feb 29-Feb

Non-Leap Year

Produces

15-Feb 28-Feb

Thirty-day Month

15-Apr 30-Apr

Thirty-one-day Month

15-Jul 31-Jul

Rule 6: Loan Disbursed After First Due Date

Configuration

1 & 15

Disbursement

12 Jan

First repayment

15 Jan

If disbursement occurs after both configured dates (for example, 20 Jan), the first repayment should be generated on the next available configured date (1 Feb).

Schedule Generation Examples

Example -1

Suppose

Loan Disbursement

5 Jan 2027

Configuration

15th Last Day

Schedule

Installment

Due Date

Installment

Due Date

1

15-Jan

2

31-Jan

3

15-Feb

4

28-Feb

5

15-Mar

6

31-Mar

7

15-Apr

8

30-Apr

Note:

Always exactly two repayments per month.

Example -2

Disbursement

18 Jan

Configured dates

1st 15th

Schedule

Inst

Due Date

Inst

Due Date

1

1-Feb

2

15-Feb

3

1-Mar

4

15-Mar

Note:

System skips past repayment dates.

Example -3

Loan Amount

12,000

Disbursement

01 Jan

 

Interest

12%

Term

6 Months

Repayment Frequency

Half Monthly

Payments

12 Installments

Example Equal Principal

Inst

Due Date

Principal

Interest

Installment

Balance

Inst

Due Date

Principal

Interest

Installment

Balance

1

15-Jan

1000

120

1120

11000

2

31-Jan

1000

110

1110

10000

3

15-Feb

1000

100

1100

9000

4

28-Feb

1000

90

1090

8000

5

15-Mar

1000

80

1080

7000

6

31-Mar

1000

70

1070

6000

7

15-Apr

1000

60

1060

5000

8

30-Apr

1000

50

1050

4000

9

15-May

1000

40

1040

3000

10

31-May

1000

30

1030

2000

11

15-Jun

1000

20

1020

1000

12

30-Jun

1000

10

1010

0

Note: The above schedule is illustrative. Actual installment amounts in Fineract will depend on the selected amortization method (equal installments, equal principal, declining balance/EIR, etc.).

Impact on Existing Features

No functional changes required for:

  • Interest calculation

  • Delinquency

  • Charges

  • Penalties

  • Accounting

  • Accruals

  • COB Jobs

  • Repayment processing

  • Prepayment allocation

  • Rescheduling

  • Write-off

  • Charge-off

Only the schedule generation engine requires enhancement.

Acceptance Criteria

  1. A loan product can be configured with a Half-Monthly repayment frequency.

  2. Users can configure two repayment dates within each month.

  3. The system validates that the configured dates are unique and in chronological order.

  4. The schedule generator produces two repayment dates per calendar month until the loan term is complete.

  5. The Last Day of Month option correctly resolves to the last calendar day, including leap years.

  6. Existing repayment processing, delinquency calculations, accounting entries, and COB processing continue to function without modification.

  7. Existing repayment frequencies (daily, weekly, monthly, yearly) remain unaffected, ensuring backward compatibility.