Platform · 2022 - 2023

Private Lending Platform - Funding Installment Plans with Investor Capital

Investors put capital into wallets; the platform funds customers' installment plans with it and pays each investor back with interest as installments fall due. Investor wallets, automatic matching, a declining-balance interest engine and a ledger built so that no payment can be posted twice. In production.

Private Lending Platform - Funding Installment Plans with Investor Capital screenshot

Outcomes

  • In production, with investors funding installment plans through the platform
  • One ledger for deposits, investments, repayments, payouts and fees, in two currencies
  • Idempotent posting: every entry carries a unique key, so a repeated job cannot post the same payment twice
  • Intake, investor matching and repayments automated from a new invoice to the investor's wallet

Overview

From 2022 to 2023 Momentaj architected and led the build of a lending platform for a private investment firm. Investors put capital into wallets on the platform. The platform uses it to fund purchases that customers pay off in installments, and pays each investor back with interest as the installments fall due. It sits between a seller, its customers and the investors, holding other people's money.

The Challenge

Four things had to be right. Matching: new invoices keep arriving from the seller's own system, and each needs an investor with enough free balance in the right currency, chosen by clear rules. Interest: every investor has to see how each payment was worked out, and rounding can't create or lose a cent. No double posting: the automation runs every few minutes, and a job that runs twice must not post the same payment twice. Visibility: investors need to see where their money is, what it has earned and what is due back, without asking.

What We Built

Each investor has one wallet per currency, showing free balance, amount invested and interest earned, with deposits recorded by administrators and the option to put the account on hold or reinvest earned interest. A scheduled job pulls new installment orders from the seller's API, resuming from where the last successful run stopped, and turns each into an invoice with its down payment and schedule. For each invoice the platform finds active investors whose wallet covers the amount and picks by administrator-set priority; administrators can assign by hand and investors can take open invoices themselves. The interest engine splits the financed amount into equal parts of principal, computes the investor's interest on the declining balance for the days between installments, puts any rounding remainder on the last installment so the parts always add up, and records the spread as platform income. Every movement of money is a transaction in a ledger: funding and each repayment are posted as a mirrored pair, each entry carries a key built from investor, seller, invoice and payment, and the database enforces that the key is unique. Scheduled jobs confirm repayments and credit wallets; cash-out requests are checked against free balance including open requests. Investors get monthly statements, upcoming repayments and interest earned; administrators get dashboards over any period and reports on any investor or seller. The web app is built in Svelte, with an API client generated from the OpenAPI description and routes generated from the pages themselves, each declaring the roles that may open it.

Results

In production, with investors funding installment plans through the platform. One ledger for deposits, investments, repayments, payouts and fees in two currencies, and intake, matching and repayment automated end to end. The ledger design, mirrored entries with a database-enforced idempotency key, is the pattern we reuse whenever software holds money.

Project Details

Client

A private investment firm

Momentaj's role

Architect and tech lead

Duration

2022 - 2023

Technologies

C# / .NET 6ASP.NET CoreMongoDBJWTOpenAPIFluentValidationTypeScriptSvelteViteTablerGitHub Actions

Topics

  • Fintech
  • Lending
  • Ledger
  • Automation
  • Svelte
  • .NET

Have a similar problem?

Tell us what you are trying to do. We will say how close this is and what it would take.

Book an AI consultation