-
Notifications
You must be signed in to change notification settings - Fork 9
Actual payoff amount can be different when calling makePayment() with different amounts #249
Copy link
Copy link
Open
Description
Scenario:
- User borrows 1_000_000. With annual apr 12.17%. First bill is generated with 10_002 interest.
- User pays 900_000 immediately. Payment is applied to 10_002 interest first, then principal. After the payment, the user has a correction of -8902, and principal balance 110_002.
- The user makes another payment immediately to payoff the account. It turned out the system allows the user to pay off.
makePayment parameter / actual amount collected for payoff
101100 / 100089
100700 / 10093
100500 / 1005
This is because we try to calculate the correction amount for the final payment using the amount used in the makePayment call. We should have calculated the payoff correction using the entire principal due. In this way, we will achieve exactly the same payoff amount. For this particular case, the payoff amount should be 100_000. The user borrowed 1_000_000, since the user paid back immediately in two batches, there should be no interest generated, 100_000 makes perfect sense.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels