Payroll is probably one of the most complex modules in any HR platform. It's not just about generating monthly salary reports — payroll touches almost everything around an employee:
Compensation & Benefits
Attendance & Timesheets
Time Off
Overtime
Policies
Taxes & Statutory rules
Contracts
Compliance
Country-specific regulations
And the reality is: every company, every country, and even every HR team works differently.
That's why before writing a single line of architecture or code, we spent months talking directly with HR and payroll teams — across different company sizes and countries — to understand their workflows, their manual effort, their approval processes, and the Excel nightmares they were quietly living with. We wanted to hear about their compliance concerns, their edge cases, and the specific moments where existing tools broke down.
Take a company with staff in Germany, Singapore, and the UAE, for example. Germany has strict statutory social insurance contributions split between employer and employee. Singapore runs on CPF contributions with rates that shift by age band. The UAE has no personal income tax, but end-of-service gratuity and WPS (Wage Protection System) compliance to account for instead. Overtime rules, payroll cycles, and statutory reporting differ across all three. A single change to one employee's attendance record has to ripple correctly through three completely different rule sets — without anyone on the HR team touching a spreadsheet to patch it manually. That's the kind of scenario we kept running into, over and over, in different forms.
We didn't want to build "just another payroll calculator." We wanted to build a payroll engine that actually helps people.
The insight that shaped our architecture
One thing became clear the more we listened: a payslip is essentially a collection of dynamic components.
Base salary
Allowances
Bonuses
Overtime
Deductions
Taxes
Statutory contributions

All of these connect through policies, formulas, attendance data, and local compliance rules. Once we saw payroll this way — as a system of connected, configurable pieces rather than a fixed calculation — the architecture became much clearer.
The hardest problem: making it dynamic without making it chaotic
The real difficulty isn't calculating one payslip correctly. It's making the system flexible per country and location — different tax systems, different statutory rules, different overtime laws, different payroll cycles, different leave regulations — without the underlying logic collapsing into an unmaintainable mess of exceptions.
That's the problem we designed around from day one: keeping country-specific rules isolated and configurable, so adding a new region doesn't mean rewriting the core engine.
This is where architecture matters most — and honestly, it's what makes building HR & payroll software genuinely interesting to us. There are still hard problems here worth solving properly.
Curious how this plays out for your team's specific setup? Book a call and we'll walk through how X-HR's payroll engine handles multi-country payroll in practice.




