> ## Documentation Index
> Fetch the complete documentation index at: https://docs.compuzign.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Saved payees and loan payoff

> The per-workspace saved-payee directory for attorneys, dealers, insurers, and government offices, and how a lender-payoff payee settles an existing loan elsewhere.

The saved-payee directory is a per-workspace list of reusable payees, so officers stop re-typing the attorneys, dealers, insurers, and government offices they pay over and over. It holds the non-secret routing and the default method. The account number is never stored here.

## Where it lives

The directory is at `/{tenantSlug}/admin/disbursement/payees`, with `/new` to add one and `/{payeeId}` to edit one. The nav label is **Saved payees**.

For a workspace on `https://loan.compuzign.com/your-slug`, the directory is at `https://loan.compuzign.com/your-slug/admin/disbursement/payees`.

## Who can manage it

The directory is gated by the `disbursements.payees.manage` capability. Both the **Disbursement** role and the **Credit Manager** role hold it. A quick save this payee from the schedule form is gated by `loans.disburse`; the dedicated management page is gated by `disbursements.payees.manage`.

## Payee types

Every saved payee is classified by `payeeType`. The enum holds seven values.

| `payeeType`     | Who it is                      |
| --------------- | ------------------------------ |
| `MEMBER`        | The member themselves.         |
| `THIRD_PARTY`   | A generic third party.         |
| `GOVERNMENT`    | A government office.           |
| `INSURER`       | An insurer.                    |
| `ATTORNEY`      | An attorney.                   |
| `LENDER_PAYOFF` | Another lender being paid off. |
| `OTHER`         | Anyone else.                   |

A new saved payee defaults to `THIRD_PARTY`.

## Managing the directory

You can create, edit, deactivate, and restore a payee. Every action is audited.

* **Create** adds a payee. It is validated and de-duplicated.
* **Edit** does a full replace of the editable fields.
* **Deactivate** hides a payee from the picker without losing the record. It flips the `active` flag rather than deleting.
* **Restore** brings a deactivated payee back.

Deactivate and restore are idempotent. Asking for a state the payee is already in is a no-op: nothing changes and no audit event fires.

Payees are de-duplicated by name. No two active payees in a workspace can share a name, compared case-insensitively, so the picker stays unambiguous. A rename that would collide with another active payee is refused.

The directory page lets you search by name, case-insensitively, and filter by status: all, active, or inactive. That is how you find a deactivated payee to restore.

The audit events are exact: `saved_payee.created`, `saved_payee.updated`, `saved_payee.deactivated`, and `saved_payee.restored`.

## The account number is never saved

A saved payee holds the name, `payeeType`, `defaultMethod`, `bankCode`, `branchCode`, `routingNumber`, `bankName`, `accountType` (one of `CHEQUING`, `SAVINGS`, `SHARE`), `swiftBic`, and `payeeAddress`. It does **not** hold the account number.

The account number is entered per disbursement and encrypted at rest. Picking a saved payee fills in the routing, then the officer types the account number for that specific payment. This is the same handling as a one-off payee: routing is non-secret and stored, the account number is secret and entered each time.

<Warning>
  A saved payee never stores an account number. Selecting one pre-fills the routing fields only. The officer still enters the account number on the disbursement.
</Warning>

## Loan payoff

A `LENDER_PAYOFF` payee settles an existing loan the member holds at another institution. It carries a `payoffReference`, the loan reference at that other lender.

A payoff payee is a payee like any other. It is one of the slices the net is split across, routed by its payment method to the other lender. The member receives the remainder. The payoff does not reduce the net itself; the net is set earlier by fees, GCT, and deductions, and the payee amounts must sum to it exactly.
