Case 07 Lending infrastructure
Lending infrastructure for four financial products
Loans, invoice financing, payroll and instant settlements for businesses in the UAE, built so that every movement of money can be explained after the fact.
- Company
- FracXn
- Live site
- fracxn.com (opens in a new tab)
- Role
- Senior Software Engineer (Contract)
- Period
- 2024 – 2025
- Location
- Dubai, UAE
- Stack
- AdonisJS, Node.js, PostgreSQL, MySQL, Redis, React, Next.js
Context
FracXn builds financial products for businesses in the UAE. During my contract I worked on four of them: a lending app, payroll, invoice financing and instant settlements.
All four move money on behalf of customers, and all four depend on parties outside the system: banks, an open-banking provider, a payment processor, accounting software, an identity provider and external lending partners.
Scope of my work
- Backend services for the lending, payroll, invoice financing and instant settlement products.
- Loan origination, approval, disbursement and repayment processing, including weekly repayment schedules, and invoice financing and factoring.
- A risk scoring service that helps lenders assess borrower creditworthiness.
- Integrations with Lean Technologies (open banking), Emirates NBD and Stripe for account data, settlements and customer payments, and with external lending partners.
- Finance automation: OCR document extraction, and QuickBooks, Zoho Books and Wafeq integrations.
- UAE PASS digital identity for onboarding, and KYC across the loan and settlement flows.
- Responsive React and Next.js frontends for the products.
Why lending leaves no room for error
Lending is a chain of commitments. An application becomes an approval, an approval becomes a disbursement, and a disbursement becomes a schedule of repayments, weekly for some products. Each step changes who owes what.
If a step runs twice, stops halfway or disagrees with the bank’s records, the result is a financial error. The system had to make every step safe to retry and possible to prove afterwards.
Shared foundations
The lending products covered the whole lifecycle: origination, approval, disbursement and repayment. The money paths underneath all four products were built on the same foundations.
Balances were kept as a ledger, calculated from recorded entries instead of stored as a number that gets overwritten. Payment APIs were idempotent, so a client retrying after a timeout got the original result back and no money moved twice. Provider webhooks were handled as events that might arrive late or more than once, and the loan and settlement flows were reconciled against the providers’ records.
Identity and compliance were part of the flows themselves: UAE PASS for onboarding, and KYC across loans and settlements.
Decisions
Ledger balances
A stored balance can drift without anyone noticing. A balance calculated from entries always matches its history, and that history is what lenders, auditors and support teams ask to see.
Idempotent payment APIs
A duplicate disbursement or charge after a retry is the most dangerous failure in lending. Idempotent APIs make a retry return the original result instead.
Reconciliation with banks and processors
They hold the other half of every transaction. Reconciling against their records means the system finds a mismatch before a customer does.
Risk scoring as a separate service
Lenders needed a way to assess borrower creditworthiness. It was built as a dedicated service, apart from the payment paths it informs.
Trade-offs
The ledger keeps growing
A ledger grows faster than a balance column, and reading a balance means summing entries or keeping snapshots. That is the cost of having an audit trail.
Idempotency needs disciplined clients
Every payment request needs a key and a stored result, and clients have to send keys consistently. That is still far cheaper than reversing a duplicate disbursement.
Many partners, many failure modes
An open-banking provider, a bank, a processor, three accounting tools, an identity provider and lending partners each have their own timeouts, retries and data formats. Each integration needs its own handling for failure and mismatch.
Delivered
- Backend services delivered for four financial products: loans, payroll, invoice financing and instant settlements.
- Ledger balances, idempotent payment APIs, webhook handling, reconciliation and KYC across the loan and settlement flows.
- Risk scoring for lenders, and finance operations automated with OCR extraction and accounting integrations.
- Onboarding with UAE PASS digital identity.