Scheduled payment process

Every active loan has a scheduled payment processing sub-process embedded in the Loan management flow. It is what makes the loan “self-collecting” — the system attempts to take the payment on the due date without manual intervention.

When it runs

A timer fires every day at 03:00 AM and asks: “Is today a payment day for this loan?”

  • Fixed-term loan. A day is a payment day if it equals the next scheduled payment date in the amortization schedule.
  • Credit line. A day is a payment day if it equals the payment date of the most recently closed billing cycle.

If today is not a payment day, the sub-process ends silently. Otherwise, it proceeds with payment processing.

Outside of the scheduled job, both loan types accept ad-hoc payments — initiated by the borrower from their portal (Initiate Payment) or by a credit officer (Register Payment, see the Register payment operation page).

What happens on the payment day

  1. The loan record is refreshed from the database.
  2. The system checks that the loan is still active.
  3. Process Payment is invoked: a transaction is created and routed to the configured repayment provider (Squarepay, VoPay variants, Plaid, Acquired, etc., or “no repayment” if no automatic provider is configured).
  4. If the provider confirms the payment, a Repayment loan event is created with the transaction reference and amount.
  5. The borrower receives a “payment received” notification.
  6. The new snapshot reflects the reduced balances.

Failure handling

If the provider rejects the payment (insufficient funds, account closed, etc.), the transaction is marked as Failed. The scheduled payment sub-process ends; the loan moves to Overdue when the calendar advances past the payment day and the obligation remains unmet, triggering the collection workflow.

Search documentation