LendEasy/Docs
Get API keys
GuidesLoansClose a loan

Close a loan

Finalize a zero-obligation or specifically approved closure only after balances, payments in flight, credits, restrictions, and reconciliation all satisfy closure invariants.

Normal closure is an outcome of authoritative balances, not an operator preference. When all obligations reach zero and no blocker remains, the loan reads as closed with obligations met. The governed close command exists for explicit finalization of eligible edge cases—not to force a nonzero balance out of view.

Closure checklist

Invariant Required state
Principal, interest, fees, penalties Zero or disposed by explicit preceding actions.
Credit balance Zero or refunded through creditBalanceRefund with its funding settled.
Payments and funding in flight None whose outcome could reopen a balance.
Reconciliation No critical unresolved exception.
Schedule All obligations met or superseded under a valid terminal action.
Autopay Cancelled/no future targets.
Restrictions and cases Closure permitted; required work completed or linked.

Execute

Close is a governed native command. A human call carries LendEasy-Case naming an open case when case management is enabled; without it the call is rejected before execution.

curl -X POST "$BASE/v1/loans/7204/transactions?command=close" \
  -H "Authorization: Bearer $TOKEN" \
  -H "LendEasy-Tenant: demo-lender" \
  -H "LendEasy-Case: case_HBR_PAYOFF_6" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: hbr-close-2028-02-20" \
  -d '{
    "transactionDate": "2028-02-20",
    "note": "Payoff and credit refund reconciled.",
    "dateFormat": "yyyy-MM-dd",
    "locale": "en"
  }'
{
  "officeId": 1,
  "clientId": 412,
  "loanId": 7204,
  "resourceId": 30471,
  "changes": {
    "transactionDate": "2028-02-20"
  }
}

If Harbor still has a $63.20 credit refund processing, the command is rejected with the blocking condition named. It does not round the credit to zero or close optimistically—check the loan summary’s credit, in-flight payment amount, and open fundings before executing. Maker-checker can park the command, and every execution writes a governance record.

Rescheduled loans

A rescheduled loan closes against its current authoritative schedule. The schedule history preserves both the original and rescheduled periods; closure does not require rewriting the original loan history.

Other terminal outcomes

Use write-off, charge-off, or contract termination for their specific economic meanings. The close command rejects a nonzero balance even if the note supplies one of those reason words.

Result

After the command posts, the loan reads as closed with its effective date, final schedule, and transaction history intact, and read APIs remain available under retention and access policy. Statement and payoff reads reflect the closed state.

Reopen after return or correction

If a covering payment later returns through the provider flow or a financial transaction is reversed, the ledger can reopen the loan under product rules. Reopening is a new recorded transition linked to the triggering event; it does not erase the closure period.

Unified search across guides, recipes & the API referenceEsc