Payment
A payment represents funds remitted by the borrower toward a credit facility. When a borrower makes a payment, the system automatically breaks it down into individual allocations that settle specific obligations according to a defined priority order. This ensures that the most critical debts are addressed first and that the repayment plan stays current.
Payment Processing Flow
When a payment is recorded against a credit facility, the following sequence occurs:
-
Payment Recording: The payment amount is recorded and credited to a payment holding account in the ledger. This holding account acts as a temporary staging area before funds are distributed to individual obligations.
-
Allocation Job Triggered: The payment recording event triggers the allocation background job, which handles the distribution of funds across outstanding obligations.
-
Obligation Retrieval and Sorting: The system retrieves all outstanding obligations for the credit facility and sorts them according to the priority rules described below.
-
Sequential Allocation: The system works through the sorted list of obligations, allocating as much of the payment as possible to each one. For each allocation, a ledger transaction moves funds from the holding account to the appropriate receivable account.
-
Completion Check: After each allocation, the system checks whether the obligation is fully satisfied. If the outstanding balance reaches zero, the obligation is marked as Paid.
Allocation Priority
The allocation algorithm distributes payment funds in a strict priority order. This ordering ensures that the most delinquent and risk-relevant obligations are settled first:
| Priority | Criteria | Rationale |
|---|---|---|
| 1 | Defaulted obligations (oldest first) | Most severe delinquency, highest risk |
| 2 | Overdue obligations (oldest first) | Active delinquency requiring resolution |
| 3 | Due obligations (oldest first) | Currently expected payments |
| 4 | Interest before Principal (within same status) | Interest obligations are prioritized over principal at the same delinquency level |
| 5 | Not Yet Due obligations (oldest first) | Early payments applied to upcoming obligations |
Within each status category, obligations are processed from oldest to newest. This ensures a first-in-first-out approach where earlier debts are cleared before more recent ones.
The interest-before-principal rule within the same status tier reflects standard lending practice: accrued interest should be settled before principal is reduced, since interest continues to accrue on outstanding principal.