
Tern: Rent Payments That Earn Rewards
Product Development
September, 2025
2 minutes
Tern lets tenants in the UAE pay rent by card and earn rewards, while landlords get paid as usual. I joined in September 2025 as a Senior Backend Engineer and rebuilt the payments core: charges, refunds, payouts, and rent in installments. Hundreds of millions of dirhams in rent payments have been processed through the payments system I rebuilt, and I have led backend engineering since September 2026.
The problem
Rent is a large payment on a fixed day. One payment touches several outside systems: card acquirers, open banking, installment providers, and UAE banks for the payout. Each one answers in its own format and at its own time. Some answer twice. Some do not answer at all.
The business rule is short, and it is hard to keep: a retry never moves money twice.
- 1. Tenant pays by card
Charged exactly once
- 2. Every dirham recorded
Written to a versioned ledger
- 3. Landlord is paid
Or the tenant is refunded
How it works
- Checks before money moves. Before a tenant pays, the platform checks identity through UAE Pass and the tenancy contract through Ejari.
- Versioned ledger writes. Every balance write carries the version it read. If another write got there first, the write fails instead of overwriting it, so two concurrent writes cannot lose an update.
- Cancellation guards on split payments. A payment in several parts is checked as a whole before a cancel runs.
I wrote up one of these patterns in Making a payment retry safe.
How it ships
A payments rebuild is only as safe as the way it reaches production. I restructured the codebase and changed how it is released:
- A release-branch workflow, with checks for linear history and stacked pull requests.
- An end-to-end test suite on the money flows. It guards every release.
- Automated build, test, and release pipelines in place of manual deploys.
- AI-assisted code review in production, with training for the team. More in Running an AI code reviewer in production.
Result
- Hundreds of millions of dirhams in rent payments processed through the payments system I rebuilt.
- Every release passes the end-to-end suite on money flows before it ships.
- Rent installments went from design to production under my lead.
- I owned and modernized the partner-facing API.
My role
Senior Backend Engineer from September 2025 to September 2026, then Lead Backend Engineer. I own the backend architecture, code review and the engineering standards, and production reliability: monitoring, alerting, and incident response. I coordinate releases across backend, web, and mobile, and I hire, onboard, and mentor engineers.
Company site: ternrewards.com.