Skip to content
Selected work

Case 05 Payroll and earned wages

Payday on any day

An HR and payroll platform with an earned-wage product, so employers can pay staff any day of the month, and payroll that also works through WhatsApp.

Role
Lead Software Engineer (Contract)
Period
2023 – 2024
Location
Lagos, Nigeria
Stack
Node.js, NestJS, Laravel, Laravel Nova, PostgreSQL, Redis, React, WhatsApp
Screenshot of the Juice Technology website
juiceme.io, the public homepage.

Context

Juice Technology builds an HR and payroll SaaS platform for employers. Its earned-wage product, Juiceme, lets employers pay staff on any day, where payroll usually means the end of the month.

I was lead software engineer on contract and led the system design.

What makes on-demand pay hard

Payroll has to be exact and on time. Paying earned wages on demand makes that harder, because money moves many times a month where it used to move once.

A payout request can be retried and a provider callback can repeat, and neither may pay an employee twice. Balances have to reconcile, and the finance and operations teams need tools to manage all of it.

How it’s built

The wallet is a separate NestJS service. Balances come from ledger entries, payouts are idempotent, provider webhooks are handled as events, and balances are reconciled. KYC is part of the wallet flows.

The HR and payroll platform runs on Laravel, with Laravel Nova for the admin and finance dashboards that operations teams use to run payroll.

Payroll also works in WhatsApp, through chatbots connected to the backend via Infobip.

Decisions

  1. 01

    The wallet as a separate service

    All the code that moves money sits behind one boundary, where the ledger, idempotency and reconciliation rules apply to every path.

  2. 02

    Idempotent payouts

    With wages paid on demand, retries happen all the time. A retried payout request returns the original result, so the employee is paid once.

  3. 03

    Payroll in WhatsApp

    Through Infobip, payroll reached staff in an app they already use.

Trade-offs

  1. 01

    Two stacks to run

    NestJS for the wallet and Laravel for the HR platform means two codebases with different conventions. That was the price of a clear boundary around money.

  2. 02

    One more channel to keep correct

    WhatsApp payroll is another client of the same backend rules, with its own message formats and failure cases to handle.

My role, in short

  • System design for the HR and payroll platform.
  • The earned-wage wallet in NestJS: ledger balances, idempotent payouts, webhooks, reconciliation and KYC.
  • Payroll over WhatsApp, with chatbots connected to the backend through Infobip.
  • Admin and finance dashboards in Laravel Nova.