Payment rules

Match incoming payments to the right lease and decide what allocation settles first.

Admin → Payment Rules → /payment-rules · Allocation rules → /payment-allocation-rules

Payment rules do two jobs:

  1. Matching — turn a bank or mobile-money reference into the right lease.
  2. Allocation order — decide which outstanding invoice a payment settles first.

Both are what let money arrive and be applied without a person reading each reference.

Matching rules

FieldPurpose
Rule nameWhat the rule is for.
Match typeHow the incoming reference is compared.
Match valueWhat is matched against.
Replace valueA normalisation applied to the reference before matching.
ReferenceThe reference pattern involved.
Bank accountThe account the rule applies to.
Branch / block / unit / leaseThe scope the rule applies to.
PriorityThe order rules are evaluated in.
Start / EndWhen the rule is effective.
Enabled / ActiveWhether it is in force.
Admin onlyWhether only administrators may edit it.

How matching works in practice

A tenant paying by mobile money types an account reference. If they type it exactly as instructed, matching is trivial. In reality they type it with spaces, with the unit name instead of the lease code, or with a previous tenant's reference.

Matching rules absorb that variation:

  • Replace value normalises the reference — stripping separators, correcting a known prefix.
  • Priority decides which rule wins when more than one could match.
  • Scope limits a rule to a bank account, branch, block, unit or lease, so a fix for one estate does not misroute another's payments.
  1. Publish one reference format and use it everywhere

    On invoices, in reminders, on the notice board. Most unmatched payments are payers using a format nobody told them.

  2. Watch what actually arrives

    Review unmatched receipts weekly for a month after go-live. The patterns repeat.

  3. Write narrow rules first

    A broad rule with high priority can capture payments it should not.

  4. Date-bound corrective rules

    A rule fixing a legacy reference format should have an end date, not live forever.

Allocation rules

Allocation rules decide the order in which a matched payment settles outstanding items — the default allocation behaviour, plus rules scoped by service type or context.

Typical orderings:

OrderRationale
Oldest firstReduces aging and write-off risk. The usual default.
Rent before utilitiesProtects the core contractual income.
Charges before penaltiesAvoids fees consuming a payment while principal debt ages.
Specific invoice firstWhere the payer identified what they were paying.

Rules can be scoped by service type, bank account and the position in the hierarchy, so a scheme with different priorities does not force a change everywhere.

Testing a rule change

  1. Run an allocation preview

    Not an execute. Read what would be allocated and what would be skipped.

  2. Check a handful of leases by hand

    Especially ones with mixed debt — rent, utilities and a penalty.

  3. Execute, then check the run log

    Allocated, skipped and error counts, with reasons.

  4. Revert if it is wrong

    Reversal is a first-class operation. Use it rather than unpicking allocations by hand.

Common problems

SymptomCause
Payments arriving unmatchedNo rule covers the reference format payers actually use.
Payment matched to the wrong leaseA broad rule with high priority. Narrow the scope.
Penalties being settled before rentAllocation order. Reorder so principal debt clears first.
Engine allocates nothingNo matching outstanding invoices in scope — read the skip reasons in the run log.

Next steps