Skip to content
Capability study6 min read

Payroll that knows the law

PF, ESI, professional tax, TDS and Form 16 encoded into an engine rather than reassembled by hand every month — and what that takes when the rules keep moving.

Indian statutory payroll is not conceptually difficult. It is a set of rules about thresholds, slabs and filings. What makes it hard to automate is that the rules differ by state, change on their own schedule, and interact in ways that are obvious only after you have got one wrong.

The usual arrangement is a payroll consultant plus a spreadsheet, run monthly. It works until the person who understands it is on leave, and it produces no audit trail anybody can inspect afterwards.

Encoding a rule rather than a result

The important design decision in Mafield was to encode the rule, not the outcome. A provident fund contribution is not a number in a configuration file; it is a calculation with a wage ceiling, an eligibility test and exceptions. Storing the rule means last March can still be recalculated under the rules that applied in March, which is exactly what an auditor asks for.

  • Provident fund, with wage ceilings and eligibility rules
  • Employee state insurance, including threshold crossings mid-year
  • Professional tax, which varies by state
  • TDS, with declarations, proofs and projections
  • Form 16 generation and bank transfer files

Rules change; history shouldn't

Every rule carries the period it applies to. A change takes effect from a date rather than overwriting what came before, so recalculating an earlier month produces the figure that was correct then — not the figure today's rules would produce. Payroll software that cannot reproduce last year's numbers is not really a record.

The part that is not arithmetic

Payroll is the most sensitive data most companies hold, and the most consequential to get wrong. Every sensitive field is permission-controlled, every change is logged with who made it, and approvals follow the chain you configure. Seven checks run before any request reaches the data; if a licence or permission is missing, the answer is no by default.

Automating a calculation is easy. Automating it so that someone can prove, two years later, why it produced that number is the actual work.

Version 1.0 is running in pilot with its first two customers — real employees, real attendance, real payroll runs. That is a small number, and we would rather say so than imply otherwise.

More writing

Read next.

Capability study

Field operations that work without a signal

GPS-verified attendance and offline work orders for engineers who are regularly somewhere with no bars — and why offline-first changes the data model, not just the app.

Opinion

AI with an audit trail

Why we give models an identity and a permission set like any other user — and why a system that cannot explain what the AI did is not ready for a business to rely on.

Working on something like this?

Tell us what you're dealing with and we'll give you an honest view of what we would build.