Usman Ali
← Work

Paismo EOR / COR

A platform where companies onboard, sign, invoice and pay contractors across countries. I built and led it end to end.

Paismo, 2025 to 2026. Employer of Record and Contractor of Record. Went to production.

My part

  1. Requirements with the PM
  2. Explaining it to clients
  3. Build
  4. DevOps
  5. Production deploys
  6. Guiding the team

The system

The parts of the platform, and the one path where money moves.

The flow

From a new client to a paid contractor.

  1. Company onboards

    The company adds its entity, address and payout schedule.

  2. Contractor signs

    An OTP-verified link, then a countersign. Every signature lands in an audit trail.

  3. Invoice

    Monthly lines are prorated. Money is exact decimal, never floats.

  4. Fund the pot

    The client sends payroll money by bank transfer.

  5. Release the batch

    A preflight checks payees, funds and currency. Then one batch pays.

  6. Settled or returned

    Each line ends as settled or returned on its own.

  7. Retry only returned

    A settled line never goes again. An Excel report closes the payout.

The decision

A payout request times out. What now?

The platform asks Pocket to pay a contractor and no reply comes back. The money may have moved, or it may not.

  1. Assume it failed and send it again. The contractor could be paid twice.
  2. Assume it went through and mark it paid. That is a guess.
  3. Treat it as unknown. The key is stored before the call, so a retry reuses it and Pocket pays once.
    try it on the home page

The cost: a key ledger and an event log to keep, and a payout can wait as unknown until it is resolved.

Three more rules the money follows

  1. Pocket is the source of truth. Webhooks are hints, so the API re-fetches.
  2. One pot per client, so one client's money cannot pay another client's contractors.
  3. Reconciliation never moves money. Unresolved cases go to a human.

What broke, and what I changed

  1. A new salary applied too early

    The new rate now waits for the countersign, in the same transaction.

  2. Invoices never marked paid

    Now a settled line flips its invoice to paid in the same transaction.

  3. One Pocket account on two contractors

    A partial unique index, a check in the service and a backstop for the race.

  4. The API moved under the build

    Three versions of the provider's API. I adapted each time. The money rules stayed the same.

Built with

TypeScript, Node.js, Express, Sequelize, PostgreSQL, Zod, Jest, Supertest. Next.js, React, MUI, TanStack Query. Auth0 with CASL. Gotenberg, pdfkit, Amazon S3. Pocket.

In their words

Going into details for payouts, a lot of thorough thinking went into it. Thank you, Usman.
CEO, Paismo, on the EOR payout work

Next