EasyPay

Client project, for a card-to-cash business in the UAE. More client work

Money control for a UAE card-to-cash business, at margins under one percent. AED 43M+ in card payments went through it in its first eight weeks.

Source is private
Status
In use
My part
Contributor on a three-person team
Started
21 Sept 2026
What I built
Slip scanning, cash handling, statements, expense files
First 8 weeks
AED 43.7M in card payments (about USD 11.9M)
Lines I added
About 8,200
Money
Exact decimals, never floating point
Runs on
Railway, Singapore

In production

From the app’s own records, launch to mid November 2026. Rounded, and the business isn’t named.

AED 43.7M

in card payments recorded in its first eight weeksAbout USD 11.9M, across 3,400 customer visits and 5,800 card payments.

  • AED 25.5Min October, the first full monthabout USD 6.9M
  • AED 1.34Mon the busiest single day
  • AED 41.6Mof bank deposits matched to the recordsabout 1,200 deposits
  • ~6,200card-machine slips read from photosOCR on the server, no outside service

At October’s pace that is a run rate of about AED 300M (USD 80M) a year. A projection, not a year of actual figures.

A customer swipes a card. The shop hands over the amount less its charge. Days later the bank credits the shop the amount less the bank’s own charge. The gap between those two charges is the profit, and it runs between 0.3% and 0.9%.

At margins that thin, a rounding error is real money. EasyPay is the system the business runs on: every card machine, every customer visit, every dealer, every movement of cash, and what was actually made. It replaced an Excel workbook.

In its first eight weeks it recorded AED 43.7M (about USD 11.9M) in card payments: AED 24.6M at the shop counter and AED 19.1M from dealers. October, the first full month, came to AED 25.5M. Over the same weeks about AED 41.6M of bank deposits were matched against the records. The client stays unnamed: these are their real books.

I am one of three people who built it. The repository belongs to the team lead and is private, so this page describes my part.

What I built

  • Card-slip scanning. Staff photograph the slip a card machine prints, and the app reads the amount, terminal ID and merchant ID and matches the slip to its machine. It runs PaddleOCR (PP-OCRv4) on ONNX Runtime inside the app, on the CPU, so no slip ever leaves the server. About 6,200 slips have been read this way so far.
  • Cash handling and dealers. Where cash comes from and goes to: the shop’s own till, cash provided by dealers, withdrawals, and what the shop owes someone out of their own money. “Add cash” and “Give cash” ask what the cash is for, so the books say why it moved.
  • The customer page and statement. What a customer swiped, the charge on each swipe, the cash paid out and any advance not yet collected. Entries that were undone stay out of the way in the activity log.
  • Statement PDFs. One export per customer or staff member: every swipe of a visit, its percentage, the card’s last four digits and the dates.
  • A charge rate per card type. Each card type carries its own customer percentage, and any card the owner adds gets one too.
  • Files on expenses. Invoices, deposit slips and receipts attached to the expense they belong to.
  • Cash flow. Till shortages by month, and salary payments that can take in charges and other amounts, each ticked by choice.

How it runs

EasyPay is in daily use and runs on Railway in Singapore: one Docker container for the app and one PostgreSQL database. Database migrations run before every deploy, and a health check only answers when the database is reachable, so a release that can’t reach its data never takes traffic. Receipt pictures go to a storage bucket rather than the container’s disk, which is wiped on every deploy.

Getting the money right

No amount in EasyPay is ever a JavaScript number. Every figure is an exact decimal from the form field to the database and back, with one place where rounding happens and tests around it.

Moving a charge is capped: a swipe’s charge can be at most 10% of the swipe, so a slip of the finger cannot turn a fee into a fortune.

Who sees what

There are three roles. The owner sees everything, including profit and rates. Staff enter figures but have no profit page and cannot change the machines, banks or rates. Viewers can only read.

How it is built

Next.js with server actions, Prisma and PostgreSQL, deployed as one container with one database. Receipts and slips are stored in a private bucket. A health endpoint answers only when the database is reachable, and migrations run before each deploy.