Skip to main content

A Simple System for Tracking IOUs and Partial Repayments

A developer-friendly approach to organizing personal loans, maintaining repayment histories, calculating outstanding balances, and managing financial obligations.

Updated 16 min readMarkdown
A Simple System for Tracking IOUs and Partial Repayments

Developers spend a significant amount of time building systems that organize information, maintain accurate records, and reduce manual errors.

Yet when it comes to personal financial arrangements, many of us still rely on messaging conversations, spreadsheets, scattered notes, and memory.

Imagine lending $500 to a friend who plans to repay the amount in several installments.

They return $150 during the first week, another $200 later, and promise to pay the remaining amount next month.

At the same time, you might owe someone else money for a shared purchase or a personal loan.

Keeping track of these arrangements becomes more challenging when multiple people, payments, and repayment dates are involved.

From a software development perspective, this is fundamentally a record-keeping problem.

Instead of treating every financial arrangement as an isolated note, we can think of it as a structured record with a clear lifecycle.

In this article, we will explore a practical system for tracking IOUs, partial repayments, outstanding balances, and personal financial obligations.

1. Understanding IOUs as Financial Records

An IOU, short for "I owe you," represents an acknowledgment that one person owes money to another.

Informal IOUs can arise from everyday situations:

  • Lending money to friends or family.
  • Borrowing money until your next payday.
  • Covering someone's share of a purchase.
  • Paying for a shared software subscription.
  • Purchasing something on behalf of another person.
  • Receiving or making partial repayments.

Unlike ordinary expenses, these arrangements involve an outstanding financial obligation.

A useful tracking system should answer four fundamental questions:

  1. Who owes the money?
  2. What was the original amount?
  3. How much has already been repaid?
  4. How much remains outstanding?

Answering these questions becomes easier when information is stored consistently.

2. Design a Simple Obligation Data Model

A reliable financial tracking system starts with a clear data structure.

At a conceptual level, each obligation can contain the following fields:

Field Purpose
ID Unique identifier
Person Individual associated with the obligation
Direction Money to receive or money to pay
Original amount Initial financial commitment
Currency Currency associated with the arrangement
Created date When the arrangement began
Due date Expected repayment date
Repayment history Individual payments
Outstanding balance Amount that remains unpaid
Status Current state of the obligation
Notes Additional arrangement details

For developers, this structure may feel familiar.

It separates the original financial arrangement from the transactions that modify its outstanding balance.

A Conceptual JSON Representation

The following example represents a fictional $500 personal loan.

Monetary amounts are stored in integer minor units, meaning 50000 represents $500.00 in USD.

{
  "id": "iou_001",
  "person": "Alex",
  "direction": "to_receive",
  "currency": "USD",
  "originalAmountMinor": 50000,
  "createdAt": "2026-11-01",
  "dueDate": "2026-12-20",
  "repayments": [
    {
      "id": "payment_001",
      "amountMinor": 15000,
      "date": "2026-11-10"
    },
    {
      "id": "payment_002",
      "amountMinor": 20000,
      "date": "2026-11-25"
    }
  ],
  "notes": "Interest-free personal loan"
}

Rather than manually maintaining several unrelated balance fields, the outstanding amount can be derived from the original amount and repayment history.

This reduces the risk of inconsistent records.

The example is a conceptual data model, not an implementation of SmartWalt's internal architecture.

3. Separate Obligations by Direction

One of the most important properties of an obligation is its direction.

There are two basic categories.

To Receive

Money another person owes you.

Examples include:

  • Personal loans you have given.
  • Outstanding reimbursements.
  • Agreed contributions toward shared purchases.

To Pay

Money you owe another person.

Examples include:

  • Money borrowed from friends.
  • Outstanding personal repayments.
  • Unpaid contributions toward shared purchases.

Consider the following fictional dataset:

Person Direction Outstanding Amount
Alex To Receive $500
Sarah To Receive $180
James To Receive $220
Daniel To Pay $250
Michael To Pay $100

The resulting totals are:

Financial Position Amount
Total to receive $900
Total to pay $350
Difference $550

However, the $550 difference is not available cash.

It only represents the difference between outstanding financial obligations in the same currency.

Expected repayments may arrive late, and money you owe may become due before you receive those payments.

A useful financial tracking system should therefore keep both directions visible rather than relying exclusively on a single net figure.

Key takeaway: Money owed to you should not automatically be treated as money available to spend.

All financial amounts in this example are fictional.

4. Calculate Outstanding Balances From Repayment History

A common mistake in financial record-keeping is replacing the outstanding amount without preserving the transactions that produced it.

For example, suppose someone borrows $500 and makes three repayments.

Transaction Payment Total Repaid Remaining Balance
Original loan $0 $0 $500
First repayment $150 $150 $350
Second repayment $200 $350 $150
Final repayment $150 $500 $0

The original amount remains unchanged.

Each repayment becomes an additional transaction associated with the obligation.

For an interest-free loan without additional fees, the calculation is:

Outstanding Balance = Original Amount - Total Repayments

After the first two repayments:

$500 - ($150 + $200) = $150

After the final repayment:

$500 - ($150 + $200 + $150) = $0

The financial obligation is now fully settled.

Figure 1: A $500 personal loan reduced to zero through three repayments of $150, $200, and $150. All amounts are illustrative.

A Simple TypeScript Implementation

Here is an example of calculating the outstanding balance using integer minor units.

interface Repayment {
  id: string;
  amountMinor: number;
  date: string;
}

function calculateRemainingBalance(
  originalAmountMinor: number,
  repayments: Repayment[]
): number {
  if (
    !Number.isSafeInteger(originalAmountMinor) ||
    originalAmountMinor <= 0
  ) {
    throw new Error("Invalid original amount");
  }

  const totalRepaidMinor = repayments.reduce(
    (total, repayment) => {
      if (
        !Number.isSafeInteger(repayment.amountMinor) ||
        repayment.amountMinor <= 0
      ) {
        throw new Error("Invalid repayment amount");
      }

      const nextTotal = total + repayment.amountMinor;

      if (
        !Number.isSafeInteger(nextTotal) ||
        nextTotal > originalAmountMinor
      ) {
        throw new Error(
          "Repayments exceed original amount"
        );
      }

      return nextTotal;
    },
    0
  );

  return originalAmountMinor - totalRepaidMinor;
}

Example usage:

const repayments: Repayment[] = [
  {
    id: "payment_001",
    amountMinor: 15000,
    date: "2026-11-10"
  },
  {
    id: "payment_002",
    amountMinor: 20000,
    date: "2026-11-25"
  }
];

const remaining = calculateRemainingBalance(
  50000,
  repayments
);

console.log(remaining / 100);

// Output: 150

In this example, the remaining balance is $150.

A production implementation should also consider currency-specific precision, duplicate transactions, concurrent updates, corrections, and any applicable interest or fees.

The main principle is that the outstanding balance should reflect the underlying repayment history.

5. Think of an IOU as a State Machine

Developers frequently use state-based approaches to manage application behavior.

Personal financial obligations can be understood in a similar way.

An obligation typically moves through three repayment states.

Outstanding

The original financial arrangement has been recorded, but no repayments have been made.

For example:

  • Original amount: $500
  • Total repaid: $0
  • Remaining balance: $500

Partially Repaid

One or more payments have been recorded, but an outstanding balance remains.

For example:

  • Original amount: $500
  • Total repaid: $350
  • Remaining balance: $150

Settled

The full amount has been repaid.

For example:

  • Original amount: $500
  • Total repaid: $500
  • Remaining balance: $0

These states can be summarized as follows:

Status Total Repaid Remaining Balance
Outstanding $0 $500
Partially repaid $350 $150
Settled $500 $0

The basic lifecycle can be represented as:

Outstanding → Partially Repaid → Settled

An obligation may also move directly from Outstanding to Settled if the entire amount is repaid in one transaction.

Deriving the Repayment Status

A simple function can determine the status using the original and remaining amounts.

type ObligationStatus =
  | "outstanding"
  | "partially_repaid"
  | "settled";

function getObligationStatus(
  originalAmountMinor: number,
  remainingAmountMinor: number
): ObligationStatus {
  if (
    !Number.isSafeInteger(originalAmountMinor) ||
    !Number.isSafeInteger(remainingAmountMinor) ||
    originalAmountMinor <= 0 ||
    remainingAmountMinor < 0 ||
    remainingAmountMinor > originalAmountMinor
  ) {
    throw new Error("Invalid obligation balance");
  }

  if (remainingAmountMinor === 0) {
    return "settled";
  }

  if (
    remainingAmountMinor === originalAmountMinor
  ) {
    return "outstanding";
  }

  return "partially_repaid";
}

For example:

getObligationStatus(50000, 50000);
// outstanding

getObligationStatus(50000, 15000);
// partially_repaid

getObligationStatus(50000, 0);
// settled

This approach makes the repayment state consistent with the outstanding balance.

A correction to a previous repayment may also cause the obligation to return to an earlier state.

Figure 2: The lifecycle of a financial obligation, showing its transition from outstanding to partially repaid and finally settled.

6. Treat Overdue as a Separate Condition

An important design consideration is distinguishing repayment status from repayment timing.

For example, an obligation may be:

  • Outstanding and not yet due.
  • Outstanding and overdue.
  • Partially repaid and not yet due.
  • Partially repaid and overdue.
  • Fully settled.

Overdue does not necessarily replace the repayment status.

A partially repaid obligation can also be overdue.

Conceptually, a financial record may contain two separate properties:

{
  "repaymentStatus": "partially_repaid",
  "isOverdue": true,
  "remainingAmountMinor": 15000
}

This separation makes it easier to understand the actual financial situation.

Repayment Status Overdue Meaning
Outstanding No No repayments made; deadline has not passed
Outstanding Yes No repayments made; deadline has passed
Partially repaid No Some money repaid; deadline has not passed
Partially repaid Yes Some money repaid; deadline has passed
Settled No No outstanding amount remains

When working with due dates in software, it is also important to consider the relevant calendar date and time zone.

A date-only repayment deadline should not accidentally become overdue because of an incorrect UTC conversion.

An obligation without an agreed due date should not automatically be classified as overdue.

From a personal finance perspective, the purpose is straightforward: understand both how much remains unpaid and whether the agreed repayment date has passed.

7. Preserve Transaction History

Imagine maintaining an obligation where the original amount is $500.

After receiving $150, you replace the value with $350.

After receiving another $200, you replace it with $150.

Although the final balance is correct, the intermediate transaction history has disappeared.

You can no longer easily answer questions such as:

  • When was the first payment received?
  • How much was the second payment?
  • Were there any corrections?
  • Has the borrower already repaid a specific amount?

A more reliable approach is to maintain separate repayment records.

Think of it as a lightweight transaction log.

Each record can contain:

  • A unique payment identifier.
  • Payment amount.
  • Payment date.
  • Optional notes.
  • Reference to the associated obligation.

This does not mean that every personal finance application needs a complete event-sourcing architecture.

For simple financial arrangements, a consistent repayment history is sufficient.

The goal is to preserve enough information to explain the current balance.

Design principle: Preserve the original arrangement and its repayment history instead of storing only the latest outstanding amount.

8. Avoid Common Data Integrity Problems

Even a small financial tracking system benefits from basic validation.

Duplicate Repayments

Recording the same payment twice produces an incorrect outstanding balance.

Unique transaction identifiers, idempotent operations, and appropriate duplicate checks can reduce this risk.

Negative Payment Amounts

A negative repayment should not be accepted as an ordinary payment.

If a transaction needs to be reversed or corrected, it should be handled through an explicit correction process.

Overpayments

A repayment should not silently reduce an obligation below zero.

Any overpayment needs to be handled according to the actual financial arrangement.

Mixed Currencies

An amount in USD should not be directly added to an amount in EUR or PKR.

Totals should be grouped by currency or converted using an explicitly defined exchange rate.

Floating-Point Precision

Financial calculations require care when using binary floating-point numbers.

For currencies with two decimal places, using integer minor units is often a practical approach.

Monetary Amount Integer Minor Units
$150.00 15000
$200.00 20000
$350.00 35000
$500.00 50000

Currency precision varies, so a production implementation should not assume that every currency uses two decimal places.

Inconsistent Balances

If the original amount, total repaid, remaining balance, and status are maintained independently, they can become inconsistent.

Deriving values from reliable underlying records or updating related fields atomically can help preserve consistency.

Concurrent Updates

Two repayment requests may occasionally arrive at nearly the same time.

Without appropriate transaction handling, both operations might calculate their results using the same previous balance.

For applications with multiple clients or synchronized records, database transactions, concurrency controls, and server-side validation can help prevent inconsistent updates.

The appropriate implementation depends on the application's architecture and storage system.

9. Apply the Same Principles Without Building an App

Although the previous examples use software development concepts, you do not need to create your own financial tracking application.

The same principles can be applied using:

  • A spreadsheet.
  • A structured notebook.
  • A local database.
  • A personal finance application.
  • A dedicated money-owed tracker.

The important part is choosing a system that makes it easy to maintain accurate records.

For most everyday financial arrangements, the system should support a simple workflow:

  1. Record the original arrangement.
  2. Identify whether the money is to receive or to pay.
  3. Record each repayment.
  4. Review the remaining balance.
  5. Check upcoming repayment dates.
  6. Confirm settlement once the full amount has been repaid.

A small, reliable system is usually more useful than a sophisticated system that becomes difficult to maintain.

10. Tracking Financial Obligations With SmartWalt

At SmartWalt, we developed an Obligations feature to help users organize money they lend and borrow separately from ordinary spending.

The feature supports:

  • Money owed to you.
  • Money you owe other people.
  • Original obligation amounts.
  • Partial repayments.
  • Outstanding balances.
  • Repayment dates.
  • Separate totals for money to receive and money to pay.

Consider the same $500 personal loan discussed earlier.

Instead of keeping repayment details across messages and notes, you can create a corresponding obligation and record individual payments as they happen.

After receiving $150, the outstanding balance becomes $350.

After receiving another $200, it becomes $150.

Once the final $150 is received, the financial arrangement is fully repaid.

This illustrates how a structured record-keeping workflow can be applied to everyday personal finances.

Learn more about the feature:

SmartWalt Money Owed Tracker

SmartWalt is designed for personal financial record-keeping. It does not provide loans, transfer money, automatically collect repayments, or contact borrowers on your behalf.

11. Build a Small Weekly Review Process

Accurate records are only useful when they remain up to date.

A short weekly review can help identify missing transactions and upcoming repayment commitments.

A practical review might include:

  • Check for new obligations.
  • Record any missing repayments.
  • Verify outstanding balances.
  • Review upcoming repayment dates.
  • Identify overdue arrangements.
  • Confirm recently settled obligations.
  • Review how upcoming payments affect your available funds.

For freelancers, this process can be combined with an existing review of invoices, project deadlines, and monthly expenses.

However, professional invoices and business accounting records should remain in their appropriate systems.

For more information about managing unpredictable freelance income, read:

How to Budget With Irregular Income

The purpose of this weekly review is not to introduce another complicated administrative task.

It is to maintain reliable financial information with minimal ongoing effort.

12. Frequently Asked Questions

Why Should Repayment History Be Stored Separately?

Maintaining individual repayment records makes it easier to understand how the outstanding balance was calculated and identify missing or duplicate payments.

Should an Overdue Obligation Have a Different Repayment Status?

Not necessarily. Overdue is a timing condition. An obligation can be partially repaid and overdue at the same time.

What Is the Easiest Way to Calculate a Remaining Loan Balance?

For an interest-free loan without additional fees, subtract the total repayments from the original loan amount.

For example, if the original amount is $500 and $350 has been repaid, the remaining balance is $150.

Why Use Integer Minor Units for Financial Calculations?

Integer minor units can help avoid certain rounding and precision problems associated with binary floating-point arithmetic.

However, applications must still account for currency-specific precision and appropriate rounding rules.

Is an IOU Tracker the Same as an Accounting System?

No. A personal IOU tracker helps organize informal lending, borrowing, and repayments. Professional accounting systems address broader business and financial reporting requirements.

Do I Need to Build My Own Money-Owed Tracking Application?

No. The data models and code examples illustrate useful principles. You can apply those principles using a spreadsheet, notebook, or existing financial application.

Can SmartWalt Track Partial Repayments?

Yes. SmartWalt's Obligations feature supports partial payment tracking and outstanding balance management for money owed in both directions.

Does SmartWalt Automatically Collect Repayments?

No. SmartWalt helps maintain personal financial records. It does not collect debts, transfer money, or contact other people on your behalf.

Final Thoughts

Managing informal financial obligations does not need to become a complicated engineering project.

However, several principles from software development translate surprisingly well into personal finance:

  • Structure information consistently.
  • Preserve transaction history.
  • Derive balances from reliable records.
  • Keep repayment states clear.
  • Validate financial amounts.
  • Review and maintain records regularly.

These principles help reduce confusion when managing money lent to friends, personal borrowing, and shared financial arrangements.

Whether you use a spreadsheet, a dedicated mobile application, or your own implementation, the objective remains the same:

Know who owes you money, understand what you owe, and maintain an accurate record of every repayment.

For a comprehensive, non-technical guide to managing personal loans and repayments, read:

How to Keep Track of Money You Lend and Borrow

You can also explore SmartWalt for personal expense tracking, budgeting, and financial organization.


Disclaimer: All names, financial amounts, and scenarios in this article are fictional and provided for educational purposes. The JSON and TypeScript examples are conceptual illustrations, not SmartWalt's actual source code or production-ready financial software. SmartWalt is a personal finance record-keeping application, not a lending or debt-collection service.

About the author

  • SmartWalt is an AI-powered personal finance and expense tracking app built to simplify everyday money management. We share insights into Flutter, Dart, mobile app development, AI integration, and the technology behind smarter budgeting tools. Explore SmartWalt: https://www.smartwalt.com

No comments yet. Be the first to comment.

More from this blog