Home About Projects Certificates
← Back to Projects

Loan closure confirmation Automation

Role: AI & Analytics Intern  |  Company: Harmoney  |  Date: 2025-2026 Summer Internship  |  Stack: TypeScript, React, Kafka, MongoDB, SendGrid, Contentful

Project Overview

During my internship at Harmoney, a high-growth FinTech lender operating in New Zealand and Australia, I was tasked with engineering an end-to-end automation for the Obligations Met Letter - Loan closure confirmation workflow. The existing process was entirely manual, with operations staff generating closure letters one by one through an admin portal and emailing them to customers individually, handling 70–80 letters per month.

My project replaced this with a fully automated, event-driven system that detects when a loan reaches a zero balance, waits an 8-standard-day buffer for any payment reversals to clear, validates eligibility, generates a personalised PDF confirmation letter, and emails it directly to the customer — all without any manual intervention. This would not only eliminate a significant operational burden but also improve the customer experience by providing a guaranteed delivery timeline and reducing the risk of errors.

The Problem

A manual workflow could create friction at multiple levels:

  • Customer uncertainty: After making their final payment, customers can be left in limbo, often needing to chase support for proof of loan closure to provide to other financial institutions.
  • Operational burden: The operations team may spend significant time each month manually generating and sending individual closure letters.
  • Compliance risk: Manual processing could introduce the risk of inconsistent details, missing dates, incorrect statuses, or delays, which could cause issues with external banks and credit reporting agencies.

Solution Architecture

The automation I built is event-driven, listening in real time for loan state changes and responding with a carefully orchestrated pipeline:

1. Event Monitoring

The system listens for real-time Kafka events, specifically "PAID_OFF" and "CANCELLED" loan states. These are the only two closure types the automation handles. When a qualifying event is detected, the pipeline is triggered.

2. Smart Eligibility Filtering

Not every closed loan should receive an automated letter. The system automatically filters out complex cases, such as debt-sold or consolidated loans, to ensure that only straightforward, verified closures are processed. This prevents the risk of sending inaccurate information to customers in cases where the loan status may not be final or where additional manual review is required.

3. The 8-Day Safety Buffer

This was the most critical design decision. In the real world, a "zero balance" doesn't always mean the money has truly settled. Direct debits and card payments can bounce days after they appear to clear. If the system sent a confirmation letter immediately, a customer could take that letter to another bank to secure a mortgage, only for the original loan to reopen when the payment is dishonoured.

To mitigate this risk, the automation enforces an 8-standard-day buffer period. But it doesn't just wait, it performs a final validation step immediately before sending, re-checking the balance at the last second. If the balance is anything other than zero, the process aborts and logs the event for the operations team.

4. PDF Generation & Delivery

Once validated, the system generates a personalised PDF letter with state-dependent content. For paid-off loans, the letter confirms the loan has been paid in full and all obligations under the contract are met. For cancelled loans, it confirms the loan has been cancelled. Each letter includes the customer's details, loan reference, outstanding balance, final payoff date, and closure status.

The letter also includes a credit reporting statement, for paid-off loans, it confirms credit agencies will be notified the loan is closed and paid in full; for cancelled loans, it notes that credit agencies will not show a record. The system automatically identifies and emails both primary and joint borrowers.

5. Self-Service Customer Download

Beyond the automated email, I also built a self-service download feature within the customer portal, allowing borrowers to access their closure letter at any time after the 8-day buffer period or if it has been sent manually by the operations team, reducing inbound support requests.

Risk Mitigation

The "clawback" scenario: where a payment is reversed after a closure letter has already been sent, was the primary risk this project needed to address. The consequences span three areas:

  • Legal liability: A closure letter is a formal financial statement. If a customer uses it to secure lending elsewhere, then the loan reopens, the company has effectively issued a false document.
  • Reputational damage: Telling someone they're debt-free and then reversing that is a terrible customer experience that erodes trust.
  • Credit reporting accuracy: Premature closure notifications create inconsistencies with credit agencies and complications for compliance and audit.

The 8-day buffer combined with the final balance re-check was the solution, balancing the customer's desire for speed with the business's need for absolute finality.

Reflection

This was the capstone project of my internship, and the perfect way to apply everything I'd learned over the summer, from event-driven architecture and database design to thinking carefully about real-world edge cases like payment reversals and legal implications. Working on a production-level system that directly impacted operations and customer experience was both challenging and incredibly rewarding. Working on such a large project enabled me to also reach out to and collaborate with teams across the business, having to cordinate with UX design teams, Collections, Engineering, Product, Legal, and Compliance to ensure the solution met all requirements and standards. Having opportunities to present my work, collaborate, and recive feedback from not only my team but also to the company at the end of the internship was truely an invaluable experience that I will carry forward into my career.

What I valued most wasn't just the technical growth, but the trust and ownership I was given as an intern, and the opportunity to see a project through from ideation to design and build this end-to-end.