BEGINNERCHAPTER 04

The loan lifecycle: from application to closure

A loan is a chain of decisions and records, and the status on its row is the last link. Count days past due from the wrong place and a defaulted loan looks current

40 MINLENDING AND CREDITUPDATED 2026-11-14
PREDICT

A customer owes one instalment of ₦52,500, due on 21 June. On 11 July the customer pays ₦13,125 (a quarter) and pays nothing after that. On 28 October, how many days past due is the loan?

A loan has a life. It starts as a request, becomes a promise, turns into cash in the customer’s wallet, and then spends months (or one month) as a schedule of dates. Most loans end quietly: the last instalment arrives and the loan closes. Some do not. This chapter follows both kinds, because the lender’s books are built for the quiet ones and judged on the others.

The lab for this chapter is Owoleaf’s loan book. Owoleaf is a fictional Lagos wallet company, and its lending is the lab’s whole universe. Every price, fee and cut-off in the data is illustrative. The chapter’s job is the sequence: what happens at each stage, what record it should leave, and how to read a status.

The stages, and the record each one leaves

Eight stages cover almost every loan. The table says what each does and what the lab keeps. Where the lab keeps nothing, the table says so: later in the chapter you see why that matters.

Stage What happens What it should record In the lab
1. Application, KYC and consent The customer asks; the lender checks who they are and records their agreement to be checked The request, the channel, the identity checks, the consent and its wording applications (product, channel, amount asked, date). No KYC or consent rows
2. Bureau check The lender asks a credit bureau what it knows The report as it was on that day bureau_reports, one row per application
3. Decision The lender’s rules approve, decline or cap the amount The decision and the reason applications.decision, decline_reason, approved_kobo
4. Offer and acceptance The customer sees the terms and agrees, or walks away The terms shown and the act of accepting decision = 'withdrawn' only: the offer was made and not taken
5. Disbursement Money moves; fees come off Amount, fee, net paid, date loans: principal_kobo, fee_kobo, disbursed_net_kobo, disbursed_at
6. Servicing The schedule runs; repayments arrive The schedule and every payment, split into fee, interest and principal schedule, repayments
7. Arrears and collections An instalment is missed; the lender chases Days past due, each contact, each promise to pay days_past_due, status. No contact log
8. Default, write-off or closure The loan ends: repaid, given up on, or both over time The end state, its date and the amount lost status: closed, default, written_off

Read the last column as a warning. A lender’s real system has a row for each of those facts. The lab’s book is a snapshot built for analysis, with a status on each loan at a cut-off date and no history of how it got there.

current0 days40 loansarrears1 to 89 days8 loansdefault90 to 179 days34 loanswritten off180+ days2 loansdays past due: 0longer overdue, more at riskclosed: 288 loans

The ladder is the lab’s own: arrears from the first day overdue, default from day 90 and write-off from day 180. Those two thresholds are illustrative, set in loans.py. A real lender sets its own, and a regulator may set the lines for a licensed lender’s reporting. The next sections walk the stages in order.

An application is a request, and it can go wrong in two ways before any money is at stake. The first is a duplicate: the same customer applies twice in a week and the lender’s system treats them as two people, so the second application sees the first’s enquiry on the bureau and is declined for “too many recent enquiries”. The second is a missing identity check, which makes every later number untrustworthy. Both come down to the same fix: the application needs a stable customer key, and a recorded decision that this person was checked.

KYC (know your customer) is the identity check: who is this, and is the account really theirs. Compliance owns it in depth, in another course. For lending the point is narrow: the lender records that the check happened and at what level, because the decision rests on it.

Consent is separate from KYC. KYC answers who you are. Consent is your agreement that the lender may look at your data, ask the bureau about you and decide on that basis. It has to be recorded as an act, with a date and what the customer saw. On the data-protection side, the Nigeria Data Protection Act 2023 puts the burden of proving consent on the data controller (section 26(1)), says that silence or inactivity is not consent, and defines consent as freely given, specific, informed and unambiguous (section 65)as of 2026-11. The section numbers rest on law-firm summaries of the Act, so check them in the text. The practical consequence is that “the customer ticked a box” is not the record. The record is which box, with what wording, when. The next chapter, credit data in Nigeria, picks up consent for the bureau in detail.

The lender’s own regulator matters too. The FCCPC’s Digital, Electronic, Online or Non-Traditional Consumer Lending Regulations 2025, issued in July 2025, cover unsecured consumer loans made through digital or other non-traditional channels, and law-firm summaries say a digital lender needs the FCCPC’s approval to operateas of 2026-11. That description rests on law-firm summaries, because the official PDF’s text could not be read in this build, and the summaries disagree on compliance deadlines and fees. Treat it as a pointer and read the Regulations before you rely on it. Which licences let a company lend is a question for module 4.

In the lab, applications records the product, the channel (the app, USSD or merchant checkout) and the amount asked. It does not record KYC or consent. Treat that as a limitation of the lab and not a model to copy.

The bureau check and the decision

A credit bureau holds what lenders have reported about a person’s borrowing. The lender asks for a report when the application arrives and gets a score (in the lab, 300 to 850) or no hit at all, called a thin file. The lab’s bureau_reports holds that answer as it stood on the application date, one row per application. The row is a snapshot on purpose. A bureau’s file changes every month. If you keep only the latest one, you cannot say later what the lender knew when it decided.

Then the lender decides. In the lab the decision is an ordered list of rules, and Owoleaf’s rules are illustrative:

  1. A score below the product’s cut-off declines (580 for SAL, the salary advance; 620 for PL, the personal loan; 560 for BNPL, buy now pay later; 600 for SME, working capital for merchants).
  2. More than 6 bureau enquiries in 90 days declines.
  3. Two or more delinquencies in 12 months decline.
  4. Less than ₦5,000 a month of wallet inflows declines (not BNPL).
  5. Otherwise the amount is capped by the customer’s inflows, and a thin file is capped at ₦50,000. If the capped amount falls below the product’s minimum, the application is declined.

The rules stop at the first failure. That is the first thing to know about a decline reason: it is the first rule failed, not the only one. In the lab, 231 of the 455 declines (about 51%) are amount_below_product_minimum, the last rule on the list. The customers were not poor risks. The cap left too little to lend. A report that reads “half of declines were about the amount” and concludes “our risk rules are too tight” has read the order wrong.

Two details of the table are worth checking yourself in the lab. First, approved_kobo is 0 on every declined and withdrawn row: nothing was approved, so nothing is recorded as approved. Application 12 in step 3 of the lab was declined on score and shows requested_kobo of 3,900,000 and approved_kobo of 0. A declined row should carry 0 because a column called approved that holds the amount asked would add declined requests into any total of what the lender approved. Query it yourself: SELECT COUNT(*) FROM applications WHERE decision != 'approved' AND approved_kobo != 0 returns 0. Second, the bureau report is attached by bureau_report_id, so a decline and its evidence are one join apart.

Offer, acceptance and disbursement

An approval is not a loan. The lender makes an offer with a principal, a price and a schedule, and the customer accepts or does not. Two things go wrong here. A customer who never saw the real cost cannot meaningfully accept it, which is why the consumer-protection chapters later in the course matter. And a lender that treats silence as acceptance has no acceptance record at all.

In the lab only the second outcome leaves a trace: 25 of the 852 applications are withdrawn with the reason customer_did_not_accept. There is no row for an acceptance, because an accepted offer becomes a loan. On a real system the accepted offer is a record in its own right, because the terms in that record are the terms you can be held to.

Disbursement is when money moves. Fees are taken from the amount at disbursement in this book. Application 105 asked for ₦1,000,000, was approved for a capped ₦310,000 (rule 5 above) and became loan L000043:

Item Kobo Naira
Principal 31,000,000 ₦310,000.00
Fee at 1% 310,000 ₦3,100.00
Paid into the wallet (net) 30,690,000 ₦306,900.00

The check is arithmetic you can redo: 1% of 31,000,000 kobo is 310,000, and 31,000,000 − 310,000 = 30,690,000. The customer borrows ₦310,000, owes interest on ₦310,000, and receives ₦306,900. The chapter on interest, APR, fees and amortisation shows what that does to the true cost; this chapter only needs you to see that three different numbers exist for one loan, and every report must say which one it means.

Servicing: the schedule and the payments

The schedule is the promise: each instalment’s due date, principal and interest. The repayments are what actually arrived. Servicing is the long middle of the lifecycle, and it is where most of the data is: 1,127 scheduled instalments and 891 payments for 372 loans.

L000043 is a six-instalment personal loan, instalments of ₦60,102.30 (6,010,230 kobo) due every 30 days from 20 July. It paid instalment 1 on its due date. At the cut-off, 28 October 2026, instalments 2, 3 and 4 are due and unpaid. Instalments 5 and 6 are due on 17 November and 17 December, which are after the cut-off, so they are neither late nor paid. They are future.

Three different amounts describe what the borrower owes on that day, and mixing them up is the commonest reading error in a loan book:

Amount What it is L000043 at 28 October
Outstanding principal All principal not yet repaid, due or not 31,000,000 − 4,615,230 = 26,384,770 kobo, ₦263,847.70
Arrears amount Instalments already due and unpaid, with interest 3 × 6,010,230 = 18,030,690 kobo, ₦180,306.90
Days past due How long the oldest unpaid instalment has been late 70 days

The arrears amount is smaller than the outstanding principal because instalments 5 and 6 are not yet due. A collections team chases the arrears amount, finance carries the outstanding principal, and risk watches the days.

Days past due

Days past due (DPD) is one number with one definition: the number of days from the due date of the oldest instalment not yet paid in full to the date you are measuring on. Everything in this chapter’s ladder hangs from it. Three rules follow from the definition.

  • The oldest unpaid instalment sets the clock. A new missed instalment does not reset it. L000043 has three overdue instalments, and DPD is 70, not 40 or 10:
Instalment Due Days overdue at 28 October
2 19 August 12 + 30 + 28 = 70
3 18 September 12 + 28 = 40
4 18 October 10
  • A part payment does not stop the clock. The instalment is paid in full or it is not. This is the trap in the Predict: the borrower who pays a quarter has made contact, and DPD counts from the due date all the same.
  • The measuring date matters. DPD is a function of a date. loans.days_past_due is DPD at 28 October 2026, the lab’s cut-off. A number with no date next to it is not a number.

The lab’s other example is L000002, a salary advance of ₦17,000. Its fee is ₦170 and ₦16,830 was paid out. It has one repayment: the principal plus 5% interest, ₦17,000 + ₦850 = ₦17,850, due on 16 May 2026, and never paid. At the cut-off it is 15 + 30 + 31 + 31 + 30 + 28 = 165 days past due. It is in default, not written off, because the lab writes off at 180 days: it reaches that line 15 days after the cut-off, on 12 November.

The status follows from DPD and the balance:

  • No principal outstanding: closed.
  • 0 days past due with principal outstanding: current.
  • 1 to 89 days: arrears.
  • 90 to 179 days: default.
  • 180 days or more: written off.

The lab’s 90-day default line is an Owoleaf policy, set in loans.py. It is modelled on the idea that banks classify a loan as non-performing once it has been overdue for a set number of days. The Central Bank of Nigeria publishes prudential guidelines for deposit money banks that classify credit facilities by how long payments are overdue; a 2010 text and an August 2019 exposure draft both existas of 2026-11. This build’s search could confirm that those documents exist, but could not read their day bands, and the 2019 draft’s categories may differ from the 2010 text. Read the current guidelines for the exact bands before you quote one. The 180-day write-off in the lab is also an Owoleaf policy, not a regulatory number.

Collections, default and write-off

Arrears is where the lender starts to chase. Collections is the work of getting the money back or agreeing a new plan, and it has a conduct side: how the lender contacts a customer, how often and what it may say. Module 2 has a whole chapter on collections and one on consumer protection and digital lending rules. This chapter needs only the records: each contact, each promise to pay and each outcome should be kept, and the lab keeps none of them. What the lab has is the result: 8 loans in arrears, 34 in default.

In the lab, default is a status on a day count. In a real lender, default is a decision with a definition: a number of days, a unit of measure (the loan or the borrower) and what happens next, such as stopping fees or handing the loan to recovery. Write the definition down. Reports that say “default rate” without it are not comparable.

Write-off is the end of carrying the loan as an asset that is expected to be repaid. It is accounting, not forgiveness. Two things go wrong. The first is reading a write-off as a repayment: the loan leaves the problem list and the book looks healthier, and no money has arrived. The second is losing the record: a written-off loan that is not tracked cannot be recovered against. In the lab, 2 loans are written off, with ₦338,005.79 of principal still outstanding on them. That amount is inside the book’s ₦8,502,584.79 total, because the loans table keeps outstanding principal on written-off rows. The project chapter at the end of this module decides how to post it in a ledger.

Closure is the happy end: principal outstanding reaches 0. 288 of the 372 loans, about 77%, are closed. The 40 current loans are not “good”: some have instalments still ahead of them, and some will fall behind. This is why the book’s loss figures cannot be read off a single date. 36 of 372 loans (about 9.7%) are in default or written off, but that figure mixes loans about four months old with loans nearly ten months old. The proper way to compare is by age of loan, called a vintage, which module 3 builds. Until then, quote the count with its date and not the word “rate”.

What a status hides

A status is a snapshot. It tells you where a loan is at the cut-off and nothing about how it got there. Two loans can both be “arrears” at 30 days past due: one has never missed a payment before, the other has been 30 days late every month. A third has been 30 days late because the customer’s salary arrived late once. The status is the same and the risk is not.

The fix is a history: a table that records every change of status with its date, and a rule that DPD is always computed from the schedule and the repayments, not typed in. In the lab you do exactly that, recompute DPD for all 372 loans from schedule and repayments, and check it against the stored column. If the computed value and the stored one agree for every loan, you can trust the stored column. If they do not agree for even four loans, you find out why before anyone sees a report.

LAB Follow one approved and one declined application, count the funnel, and recompute days past due ~35 MIN
YOU NEEDPython 3.9 or later (standard library only)labs/finance with the loan book generatedNo Docker, no packages

You work in labs/finance. Every step is Python run from that folder against data/finance.sqlite, and the same tables are in data/*.csv if you prefer a spreadsheet. The mock bureau is not needed in this chapter.

1. Check the loan book exists. If data/finance.sqlite is missing the loan tables, build them. Generating takes about 3 seconds at the default scale of 0.1.

cd labs/finance
python3 generate.py && python3 loans.py && python3 check.py

generate.py prints its table sizes and ends with the planted breaks. loans.py prints two lines. check.py ends with the loan-book line and OK:

852 applications, 372 loans, 1127 instalments, 891 repayments
loan status at 2026-10-28: arrears 8, closed 288, current 40, default 34, written_off 2
loan book: 372 loans, 850,258,479 kobo of principal outstanding; checks 7-11 run
OK: all invariants hold

Seed 42 gives the same numbers every time. If you already have the data, run only python3 check.py and look for the same last two lines. The 850,258,479 kobo is ₦8,502,584.79.

2. Count the funnel. Applications to decisions to loans to statuses, in one script.

python3 - <<'PY'
import sqlite3

db = sqlite3.connect("data/finance.sqlite")

def naira(kobo):
    return f"₦{kobo // 100:,}.{kobo % 100:02d}"

print("1. applications by decision and reason")
for decision, reason, n in db.execute("""
        SELECT decision, COALESCE(decline_reason, '-'), COUNT(*)
        FROM applications GROUP BY 1, 2 ORDER BY 1, 3 DESC"""):
    print(f"   {decision:<9} {reason:<30} {n:>4}")

total, = db.execute("SELECT COUNT(*) FROM applications").fetchone()
approved, = db.execute("SELECT COUNT(*) FROM applications WHERE decision = 'approved'").fetchone()
loans, = db.execute("SELECT COUNT(*) FROM loans").fetchone()
joined, = db.execute("""SELECT COUNT(*) FROM applications a
                        JOIN loans l ON l.application_id = a.id
                        WHERE a.decision = 'approved'""").fetchone()
print(f"2. applications {total}, approved {approved}, loans {loans}, approved with a loan {joined}")

print("3. loans by status at the cut-off")
for status, n, dpd_lo, dpd_hi, out in db.execute("""
        SELECT status, COUNT(*), MIN(days_past_due), MAX(days_past_due),
               SUM(outstanding_principal_kobo)
        FROM loans GROUP BY status ORDER BY MIN(days_past_due), status"""):
    print(f"   {status:<12} {n:>4} loans  dpd {dpd_lo:>3}-{dpd_hi:<3}  outstanding {naira(out):>16}")
all_out, = db.execute("SELECT SUM(outstanding_principal_kobo) FROM loans").fetchone()
print(f"   all          {loans:>4} loans                 outstanding {naira(all_out):>16}")
PY
1. applications by decision and reason
   approved  -                               372
   declined  amount_below_product_minimum    231
   declined  insufficient_income_evidence    108
   declined  score_below_cutoff              100
   declined  recent_delinquency               16
   withdrawn customer_did_not_accept          25
2. applications 852, approved 372, loans 372, approved with a loan 372
3. loans by status at the cut-off
   closed        288 loans  dpd   0-0    outstanding            ₦0.00
   current        40 loans  dpd   0-0    outstanding    ₦5,760,222.04
   arrears         8 loans  dpd   2-71   outstanding    ₦1,011,461.80
   default        34 loans  dpd  93-177  outstanding    ₦1,392,895.16
   written_off     2 loans  dpd 185-200  outstanding      ₦338,005.79
   all           372 loans                 outstanding    ₦8,502,584.79

852 applications split into 372 approved (43.7%), 455 declined (53.4%) and 25 withdrawn (2.9%). Every approved application has exactly one loan, and no declined or withdrawn one has any. The outstanding principal adds up to ₦8,502,584.79, the figure the check script reported in kobo. The status bands do not overlap: arrears tops out at 71 days and default starts at 93, which is the 90-day line.

3. Follow a declined and an approved application through every table. Application 12 was declined; application 105 became L000043.

python3 - <<'PY'
import sqlite3

db = sqlite3.connect("data/finance.sqlite")
db.row_factory = sqlite3.Row

def show(title, sql, *args):
    rows = db.execute(sql, args).fetchall()
    print(f"-- {title}: {len(rows)} row(s)")
    for r in rows:
        print("   " + ", ".join(f"{k}={r[k]}" for k in r.keys()))

def follow(app_id):
    show("applications", """SELECT id, product, channel, applied_at, requested_kobo, approved_kobo,
                            decision, decline_reason FROM applications WHERE id = ?""", app_id)
    show("bureau_reports", """SELECT b.id, b.reported_at, b.hit, b.score, b.delinquent_12m, b.enquiries_90d
                              FROM bureau_reports b JOIN applications a ON a.bureau_report_id = b.id
                              WHERE a.id = ?""", app_id)
    show("loans", """SELECT id, principal_kobo, fee_kobo, disbursed_net_kobo, disbursed_at, status
                     FROM loans WHERE application_id = ?""", app_id)
    show("schedule", """SELECT s.loan_id, s.instalment, s.due_date, s.total_kobo FROM schedule s
                        JOIN loans l ON l.id = s.loan_id WHERE l.application_id = ?""", app_id)
    show("repayments", """SELECT r.loan_id, r.instalment, r.paid_at, r.amount_kobo FROM repayments r
                          JOIN loans l ON l.id = r.loan_id WHERE l.application_id = ?""", app_id)

print("=== A declined application: 12 ===")
follow(12)
print()
print("=== An approved application: 105 (loan L000043) ===")
follow(105)
PY
=== A declined application: 12 ===
-- applications: 1 row(s)
   id=12, product=SAL, channel=app, applied_at=2026-04-23, requested_kobo=3900000, approved_kobo=0, decision=declined, decline_reason=score_below_cutoff
-- bureau_reports: 1 row(s)
   id=12, reported_at=2026-04-23, hit=1, score=556, delinquent_12m=1, enquiries_90d=1
-- loans: 0 row(s)
-- schedule: 0 row(s)
-- repayments: 0 row(s)

=== An approved application: 105 (loan L000043) ===
-- applications: 1 row(s)
   id=105, product=PL, channel=app, applied_at=2026-06-20, requested_kobo=100000000, approved_kobo=31000000, decision=approved, decline_reason=None
-- bureau_reports: 1 row(s)
   id=105, reported_at=2026-06-20, hit=1, score=656, delinquent_12m=0, enquiries_90d=4
-- loans: 1 row(s)
   id=L000043, principal_kobo=31000000, fee_kobo=310000, disbursed_net_kobo=30690000, disbursed_at=2026-06-20, status=arrears
-- schedule: 6 row(s)
   loan_id=L000043, instalment=1, due_date=2026-07-20, total_kobo=6010230
   loan_id=L000043, instalment=2, due_date=2026-08-19, total_kobo=6010230
   loan_id=L000043, instalment=3, due_date=2026-09-18, total_kobo=6010230
   loan_id=L000043, instalment=4, due_date=2026-10-18, total_kobo=6010230
   loan_id=L000043, instalment=5, due_date=2026-11-17, total_kobo=6010230
   loan_id=L000043, instalment=6, due_date=2026-12-17, total_kobo=6010230
-- repayments: 1 row(s)
   loan_id=L000043, instalment=1, paid_at=2026-07-20, amount_kobo=6010230

The declined application stops after two tables: it has a bureau report (score 556, under the SAL cut-off of 580) and nothing else. Notice approved_kobo=0 on a declined row, beside requested_kobo=3900000: nothing was approved. The approved one runs through all five. It asked for ₦1,000,000 (100,000,000 kobo) and was approved for ₦310,000 (31,000,000 kobo), the amount its wallet inflows allowed. Its score of 656 clears the PL cut-off of 620. It was disbursed the day it applied and has one payment, instalment 1, paid on its due date.

4. Recompute days past due and check it against the table. received is what each instalment has been paid, from repayments, with the late fee taken out because a fee does not pay the instalment down. An instalment is unpaid if it is due before the cut-off and received is less than its total.

python3 - <<'PY'
import sqlite3
from datetime import date

db = sqlite3.connect("data/finance.sqlite")
cut_off = date.fromisoformat(db.execute(
    "SELECT value FROM loan_book_meta WHERE key = 'cut_off'").fetchone()[0])

# What each instalment has received: principal + interest from its repayments.
# The late fee is a charge on top, so it does not pay the instalment down.
received = {(loan, n): kobo for loan, n, kobo in db.execute(
    """SELECT loan_id, instalment, SUM(amount_kobo - late_fee_kobo)
       FROM repayments GROUP BY loan_id, instalment""")}

def unpaid_due(loan_id):
    """Instalments due before the cut-off that have not been paid in full."""
    out = []
    for n, due, total in db.execute(
            "SELECT instalment, due_date, total_kobo FROM schedule WHERE loan_id = ? ORDER BY instalment",
            (loan_id,)):
        due = date.fromisoformat(due)
        if due < cut_off and received.get((loan_id, n), 0) < total:
            out.append((n, due))
    return out

def days_past_due(loan_id):
    unpaid = unpaid_due(loan_id)
    return (cut_off - min(d for _, d in unpaid)).days if unpaid else 0

print("cut-off", cut_off)
for n, due in unpaid_due("L000043"):
    print(f"L000043 instalment {n} due {due}: {(cut_off - due).days} days overdue")
print("L000043 days past due:", days_past_due("L000043"))
print("L000002 days past due:", days_past_due("L000002"))

checked = wrong = 0
for loan_id, stored in db.execute("SELECT id, days_past_due FROM loans"):
    checked += 1
    if days_past_due(loan_id) != stored:
        wrong += 1
        print("MISMATCH", loan_id, days_past_due(loan_id), stored)
print(f"checked {checked} loans, {wrong} mismatches")
PY
cut-off 2026-10-28
L000043 instalment 2 due 2026-08-19: 70 days overdue
L000043 instalment 3 due 2026-09-18: 40 days overdue
L000043 instalment 4 due 2026-10-18: 10 days overdue
L000043 days past due: 70
L000002 days past due: 165
checked 372 loans, 0 mismatches

Your recomputation from the schedule and the payments matches loans.days_past_due for all 372 loans. L000043 is 70 days past due because instalment 2 is the oldest unpaid; instalments 3 and 4 are late too but do not move the clock. L000002 is 165 days past due, as the chapter worked out by hand.

5. Check the status ladder and read the arrears. Status should follow from days past due and the outstanding balance. The second half splits the open loans that are not in default into age buckets.

python3 - <<'PY'
import sqlite3

db = sqlite3.connect("data/finance.sqlite")

def naira(kobo):
    return f"₦{kobo // 100:,}.{kobo % 100:02d}"

def status_for(days_past_due, outstanding_kobo):
    if outstanding_kobo == 0:
        return "closed"
    if days_past_due >= 180:
        return "written_off"
    if days_past_due >= 90:
        return "default"
    if days_past_due > 0:
        return "arrears"
    return "current"

wrong = 0
for loan_id, dpd, out, stored in db.execute(
        "SELECT id, days_past_due, outstanding_principal_kobo, status FROM loans"):
    if status_for(dpd, out) != stored:
        wrong += 1
        print("MISMATCH", loan_id, dpd, out, stored)
print("ladder mismatches:", wrong)

print("loans still open and not in default, by days past due")
for lo, hi, label in [(0, 0, "0"), (1, 29, "1-29"), (30, 59, "30-59"), (60, 89, "60-89")]:
    n, out = db.execute(
        """SELECT COUNT(*), COALESCE(SUM(outstanding_principal_kobo), 0) FROM loans
           WHERE status IN ('current', 'arrears') AND days_past_due BETWEEN ? AND ?""",
        (lo, hi)).fetchone()
    print(f"  {label:>5} days: {n:>3} loans, outstanding {naira(out):>14}")
PY
ladder mismatches: 0
loans still open and not in default, by days past due
      0 days:  40 loans, outstanding  ₦5,760,222.04
   1-29 days:   3 loans, outstanding    ₦276,878.20
  30-59 days:   2 loans, outstanding    ₦214,965.02
  60-89 days:   3 loans, outstanding    ₦519,618.58

The ladder in the code reproduces every stored status. The three arrears buckets add to ₦1,011,461.80 (276,878.20 + 214,965.02 + 519,618.58), the arrears figure from step 2, and 3 + 2 + 3 = the 8 loans in arrears. Most of the arrears principal sits in the oldest bucket, the one closest to default.

Change the definition of “paid” and watch the book lie. In step 4, an instalment counts as paid when it has received its full total. Replace that test with “any repayment row exists for it” and recompute. This version builds its own set of instalments that have any payment:

python3 - <<'PY'
import sqlite3
from datetime import date

db = sqlite3.connect("data/finance.sqlite")
cut_off = date.fromisoformat(db.execute(
    "SELECT value FROM loan_book_meta WHERE key = 'cut_off'").fetchone()[0])
any_payment = {(loan, n) for loan, n in db.execute("SELECT loan_id, instalment FROM repayments")}

wrong = []
for loan_id, stored in db.execute("SELECT id, days_past_due FROM loans"):
    unpaid = [date.fromisoformat(due) for n, due in db.execute(
        "SELECT instalment, due_date FROM schedule WHERE loan_id = ? ORDER BY instalment", (loan_id,))
        if date.fromisoformat(due) < cut_off and (loan_id, n) not in any_payment]
    mine = (cut_off - min(unpaid)).days if unpaid else 0
    if mine != stored:
        wrong.append((loan_id, mine, stored))
print(len(wrong), "mismatches")
for loan_id, mine, stored in wrong:
    print(f"  {loan_id}: any-payment rule {mine}, stored {stored}")
PY

You get 4 mismatches: L000004 (0 instead of 129), L000139 (0 instead of 97), L000170 (0 instead of 113) and L000252 (0 instead of 133). Each is a borrower who stopped paying and then sent about a quarter of the repayment. Under the any-payment rule those four loans look current, and all four are past the 90-day line. L000004 is the loan from the Predict: a ₦50,000 salary advance, ₦52,500 due on 21 June, ₦13,125 paid on 11 July. Now ask which report at Owoleaf would have shown it as current, and what a monthly review would have missed.

ARTEFACT Write the loan operations process map ~50 MIN
YOU PRODUCEA loan operations process map

Template

# Loan operations process map: <lender>, <product>, as at <date>
Prepared by <analyst>, lending operations. Signed by <head of lending operations>.

## 1. Stages
| Stage | Owner | System of record | Service level (target) | If stuck: after how long, who acts, what they do |
|---|---|---|---|---|
| 1. Application, KYC and consent | <name> | <table or system, or "none"> | <hours or days> | <...> |
| 2. Bureau check | | | | |
| 3. Decision | | | | |
| 4. Offer and acceptance | | | | |
| 5. Disbursement | | | | |
| 6. Servicing | | | | |
| 7. Arrears and collections | | | | |
| 8. Default, write-off or closure | | | | |

## 2. Definitions
Days past due: <definition>, measured on <date>, computed by <owner>. Default at <days>. Write-off at <days>.

## 3. Where loans are now
Count and amount at each status, and how many sit near the next line.

## 4. Gaps
Stages with no record, or two records that disagree: <list, with owner>.

## 5. How this could be wrong
<one way, and what would show it>

## 6. Decision and sign-off
Decision needed: <what, from whom, by when>. Out of scope: <what this map does not cover>.
Prepared <name, date>. Approved <name, date>.
WORKED EXAMPLE

An analyst on Mojeed’s lending operations team writes the map; Mojeed, who runs lending operations at Owoleaf, signs it. This is the salary-advance, personal-loan, BNPL and SME book at the 28 October 2026 cut-off. Service levels are the team’s own targets.

Stage Owner Record Target If stuck
1. Application, KYC, consent Mojeed applications; no KYC or consent rows same day gap: Toyosi adds a consent row
2. Bureau Toyosi bureau_reports same day none after 1 day: Toyosi retries, then Mojeed decides
3. Decision Mojeed applications.decision same day disputed: Mojeed reviews the first rule failed
4. Offer Mojeed none until accepted 7 days untaken: marked withdrawn (25 so far)
5. Disbursement Toyosi loans day of application not in wallet in 1 day: Toyosi traces
6. Servicing Toyosi schedule, repayments posted same day missing payment: Toyosi checks the rail
7. Arrears Mojeed days_past_due; no contact log contact within 3 days of due date 60 days: Mojeed reviews weekly
8. End Mojeed status default at 90, write-off at 180 write-off not approved: stays in default, Mojeed reviews monthly

Definition. Days past due counts from the oldest instalment not paid in full, on 28 October 2026, computed by Toyosi. All 372 loans match the stored column.

Now. 40 current, 8 in arrears, 34 in default (₦1,392,895.16), 2 written off, 288 closed. Three arrears loans are 60 to 89 days late with ₦519,618.58 outstanding, close to default.

Could be wrong. The support app has its own rule: L000004 is 129 days late and shows current there. Check the app against the recomputation.

Decision. Mojeed is asked to approve Toyosi as sole owner of days past due, and a contact log for stage 7. Collections conduct is out of scope.

Now you

You are a lending operations analyst at a lender of 25 people whose only product is working capital for merchants, which the lab models as SME. Your head of lending operations signs what you write. Write its process map as at 28 October 2026. In the lab, filter the step 2 funnel and the step 3 status counts to product = 'SME' (or filter the data/*.csv files in a spreadsheet), and compare the loan sizes and the number of instalments with what the chapter shows for L000043. The SME score cut-off is 600. The lender has one underwriter, no collections staff and no contact log. Name an owner for every stage, say where a record is missing, and set targets you can defend for loans this size. Your head of lending operations reads the map to decide who to hire first and which record to build first.

Self-check

DECIDE

Owoleaf has 60 people. Mojeed finds that the support app treats an instalment as paid once any money arrives, the collections list counts days late from the oldest unpaid due date, and finance reports default at 90 days on the collections count. Four loans that finance calls defaulted show as current in the app. Toyosi can change the app, the collections list or the finance query by Friday. What do you do first?

READING
  1. DOC
    Digital, Electronic, Online or Non-Traditional Consumer Lending Regulations, 2025 (FCCPC) Federal Competition and Consumer Protection Commission, 2025

    The primary text for who may lend digitally in Nigeria and how, as hosted by the FCCPC. Read the sections on approval, on what a lender must display to a customer and on consent; the chapter's FCCPC point rests on summaries, so check it here first.

  2. DOC
    DEON Consumer Lending Guidelines, 2025 (FCCPC) Federal Competition and Consumer Protection Commission, 2025

    The commission's companion document on how it approaches the administration and operation of the Regulations. Read it for the regulator's own framing of a lender's duties; it is guidance, so keep it apart from the Regulations' binding text.

  3. DOC
    Prudential Guidelines for Deposit Money Banks (CBN, 30 June 2010) Central Bank of Nigeria, 2010

    The CBN's own text on classifying credit facilities by how long payments are overdue. Read the classification section to see how a bank's bands work. It is the 2010 version, and an August 2019 exposure draft differs: look for the current text before relying on a band.

  4. DOC
    Nigeria Data Protection Act 2023, with the GAID 2025 (NDPC) Nigeria Data Protection Commission, 2023

    The Act itself, with the Commission's implementation directive. Read section 26 on consent and section 65, which defines it: they say what a lender must be able to show about a customer's agreement. Skip the sections on transfers abroad on a first pass.

  5. DOC
    Credit Reporting Act 2017 Federal Republic of Nigeria (text via Judy Legal), 2017

    The Act behind the bureau stage, assented to on 30 May 2017, as reproduced on a legal-text site (not the official gazette copy). Read the parts on who may report to a bureau and who may see a report; the next chapters on credit data use it.

  6. POST
    Unpacking the New DEON Consumer Lending Guidelines 2025 (Aluko and Oyebode) Aluko and Oyebode, 2025

    A law firm's commentary on the Guidelines and the Regulations, useful for orientation before the primary text. It is commentary, not the rule: use it to find the sections worth reading and then read them yourself.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Credit data in Nigeria: bureaus, BVN, NIN →