Skip to content

Disbursements

The apps.disbursements module manages loan funding --- the process of sending money to borrowers or third parties after a loan is approved.

Disbursement Flow

pending → processing → completed
                └──→ failed
                └──→ cancelled

Disbursement Model

Field Description
loan FK to the loan being funded
amount Disbursement amount (MoneyField)
method ACH, wire, check, cash, or card
status pending, processing, completed, failed, or cancelled
recipient_type Who receives the funds (see below)
recipient_name Name of the recipient
disbursed_by FK to the user who initiated the disbursement

Recipient Types

Type Description
borrower Direct to borrower
dealer Auto dealer or equipment vendor
merchant Point-of-sale merchant
creditor Debt consolidation payoff
escrow Escrow account

Over-Disbursement Guard

The system prevents over-funding a loan:

SUM(non-cancelled, non-failed disbursements) ≤ loan.principal_amount

If the total of all active disbursements would exceed the loan's principal amount, the disbursement is rejected.

On Completion

When a disbursement completes:

  1. GL entries posted: DR Loans Receivable, CR Cash
  2. Origination fee assessed automatically if configured on the loan product's fee schedule
  3. Loan status transitions to active (if this is the first/only disbursement)
  4. Amortization schedule generated via the lending program's generate_schedule() method

Failure and Cancellation

  • Failed: External processing failure (e.g., ACH rejection). Can be retried.
  • Cancelled: Manually cancelled before processing completes. Does not count toward the over-disbursement limit.

See Also