HR & Payroll

Integrating ZKTeco Biometrics with Custom Payroll Software

A practical guide to connecting ZKTeco devices to your attendance and payroll backend — Push SDK, Pull SDK, and when to use which.

Nooray YemonUpdated 9 min read

To connect ZKTeco devices to payroll, first get clean punches off the device, either by pulling them on a schedule or having the device push them to a server. Then map device IDs to employees, apply shift, leave and overtime rules in software, and test with real messy data before go-live.

ZKTeco fingerprint and face devices are very common in Bangladeshi offices, garment floors, schools and NGO field offices, so the real question is rarely whether to support them. It is how raw punches become a salary figure you can defend to an employee, an auditor or a labour inspector. Below: the options, the data model, the messy cases, and when to buy instead of build.

The four ways to get punches out of a device

Whatever the model, there are only a handful of ways attendance logs leave a device. Each has a different failure pattern, so pick based on your network and how fresh the data needs to be.

ApproachHow it worksGood forWatch out for
Pull (device SDK)Your server connects to each device over the network on a schedule and reads new logs.Single site, devices on the same LAN or reachable by VPN.Needs a reachable IP. Devices behind NAT or a mobile broadband router are hard to reach.
Push (often called ADMS or cloud push)The device is configured with a server address and sends logs to it when punches happen.Many branches, devices behind NAT, no static IPs.Server must be reachable from every branch, and you must handle retries and duplicates.
CSV or USB exportSomeone exports a log file from the device and uploads it.Very small sites, a fallback when the network is down.Depends on a person remembering. Late uploads mean late payroll.
Middleware or vendor softwareA desktop or server program collects logs into a database, and your payroll reads from that database.Teams that already run the vendor's tool and want a quick bridge.You inherit its schema and its quirks. Check how it handles device resets and re-downloads.

Many organisations end up with a mix: push for remote branches, pull for the head office, and a file import as the emergency route. Design the system so all of them feed one common punch table.

Push versus pull on Bangladeshi networks

Pull is simple to reason about: your server decides when to ask, so a failed run can be repeated. The catch is reachability. Many branch offices and factories sit behind a router you do not control, with a changing public address, and opening ports to devices from the internet is a security risk.

Push flips this. The device makes an outbound connection, which usually works through ordinary NAT with no router changes. The trade-off is that your server becomes a public endpoint that must accept device traffic reliably. Plan for devices that reconnect after an outage and send a burst of old logs, and for the same punch arriving more than once.

Firmware and protocol options vary between models, so test one device on the real network before committing to an architecture.

The data model that keeps payroll honest

Most payroll disputes trace back to a thin data model. Keep raw punches immutable and build everything else on top of them.

  • Employee and device-user mapping: a device stores its own user ID, which is not your employee ID. Keep a mapping table, and allow one employee to have different device IDs at different branches.
  • Raw punches: device, device user ID, timestamp, and the time you received it. Never edit these. Corrections belong in a separate adjustments table with who changed what and why.
  • Shifts and rosters: a shift has a start, an end, a grace window and a rule for which day it belongs to. A roster assigns shifts to people by date.
  • Daily attendance: a calculated record per employee per day (present, late, absent, leave, holiday, weekly off), derived from punches plus rules. This can be recalculated if rules change.
  • Payroll period snapshot: when you close a month, freeze the figures that went into it so an old payslip can always be explained.

If your system overwrites punches when someone fixes a missing entry, you can no longer show what actually happened.

Handling messy punches

Real devices produce untidy data. Decide the rule for each case once, write it down, and make it visible to HR and to employees.

Missing out-punch

Someone forgets to punch on the way out, or the device was busy at closing time. Do not guess silently. Flag the day as incomplete, let a supervisor confirm the real time, and record the correction as an adjustment. Some employers apply a default out-time for specific shifts, but that should be an explicit policy, not a hidden default.

Double punches

People tap twice, or a push retry delivers the same record again. Use a short de-duplication window (for example, ignore a second punch by the same person within a minute or two) and a unique key of device, user ID and timestamp so repeated deliveries do not create duplicates.

Night shifts

A shift that starts at 10 pm and ends at 6 am crosses midnight, so splitting punches by calendar date gives nonsense. Assign punches to a shift instance, not to a date, and define a cut-off window that decides which shift a punch belongs to.

Device clock drift

Device clocks drift, and a reset or power loss can put them badly wrong. Sync device time regularly, record when each device was last synced, and keep the receive time next to the punch time so you can spot a device that is minutes or hours off. A single drifting device can make a whole branch look late.

Turning attendance into payroll inputs

Punches alone do not make a payroll. The attendance engine must also know about leave, holidays and the overtime policy, and these are where Bangladeshi workplaces differ most from a generic template.

  • Leave: approved leave should override an absent day automatically, and half-day leave must interact correctly with late arrival.
  • Holidays and weekly off: keep a calendar per company or branch. Religious holidays depend on moon sighting, so allow the calendar to be edited close to the date.
  • Late and absent handling: define the grace period, how many late days convert to a deduction or a leave debit, and who can waive it. Write the rule exactly as your HR policy states it.
  • Overtime: define what counts (hours beyond the shift, approval required or not), how it is rounded, and how rates are determined. The Bangladesh Labour Act has provisions on working hours and overtime, so check the current rules and take legal advice for your sector, particularly for factories.
  • Loans and advances: recoveries are payroll inputs too. Keep them separate from attendance so one cannot corrupt the other.

A good payroll export is a list of per-employee figures (days present, leave days, late count, overtime hours, deductions) plus a clear trail back to the daily records. Whether that lands in your own payroll module, an accounting tool or a spreadsheet, make the export repeatable so the same month always produces the same result.

Multi-branch and offline devices

With several branches you want one employee master and one rule set, with devices tagged to a branch. Devices keep logs in their own memory when the internet drops, and most will deliver them later. Your system should treat late-arriving punches as normal, recalculate the affected days, and warn you if a month is already closed.

Monitor device health explicitly: last time each device reported, and how many punches it sent. A device that has gone silent for a day is often a power or network problem, and finding out at month-end is expensive. If hosting is a concern, a cloud deployment with proper backups is usually easier to keep reachable than a server under a desk.

Security and privacy of biometric data

Fingerprint and face data is sensitive. Many devices store templates (mathematical representations) rather than images, but you should still treat them as personal data.

  • Collect only what you need. Often payroll needs the punch log, not the biometric templates, so avoid copying templates into your database unless you have a clear reason.
  • Restrict who can enrol, delete or export users on the device, and change default admin passwords and communication keys.
  • Keep devices on a separate network segment where possible, and avoid exposing them directly to the internet.
  • Encrypt connections between devices and your server where the device supports it, and keep database backups protected.
  • Tell employees what is collected and why, and have a process for removing data when someone leaves.
  • Data protection law in Bangladesh is still developing, so check the current position and take legal advice if you hold data for many people.

A test and go-live checklist

  1. 1Export the employee list and confirm every person has exactly one device ID per branch, with no duplicates or blanks.
  2. 2Check each device clock against a trusted time source and record the offset.
  3. 3Run both systems in parallel for at least one full payroll cycle, comparing the old figures with the new ones person by person.
  4. 4Deliberately create test cases: a missing out-punch, a double tap, a night shift, a leave day, a public holiday, and a device unplugged for a day.
  5. 5Confirm the device-to-server path works after a router restart and after a power cut.
  6. 6Agree who corrects punches, how corrections are approved and where they are logged.
  7. 7Freeze the rules (grace period, overtime, holiday calendar) in writing before the first live month.

How to decide: buy, build and next steps

Buy or build

If your rules are fairly standard (a few shifts, leave types, overtime, loans and advances) a ready product usually reaches go-live faster and is cheaper to maintain than a custom build. HajiraPro is TECFIQ's attendance and payroll product for this case. Its listed capabilities include biometric device integration across branches, attendance sync, leave management, loans and salary advances, payroll runs, and multi-company support. If you already use ProHRM or are weighing HR suites more broadly, our note on HR software for Bangladesh SMEs covers the wider decision.

A custom build starts to make sense when attendance must feed an existing in-house system, when you have unusual pay structures or union agreements, or when you need integration with tools a product does not cover. That work is what our custom software development team does, and the data model above is where we would start.

Next steps

  1. 1List your devices (brand, rough age, network setup at each branch) and note which ones can reach the internet.
  2. 2Write down your real rules: shifts, grace period, late policy, overtime and holidays. If you cannot write them, no software can apply them.
  3. 3Decide push, pull or a mix based on branch connectivity, and test one device first.
  4. 4Compare a ready product against your rule list. Anything it cannot cover is your custom-build scope.
  5. 5Run a parallel month before switching over.

If you would like a second opinion on your device setup or rule list, contact TECFIQ and we can talk through it. Ask us to confirm exactly which device models and features HajiraPro supports for your case before you commit.

Frequently asked questions

What is the difference between push (ADMS) and pull for ZKTeco devices?

With pull, your server connects to the device and reads logs on a schedule, which needs a reachable address. With push, the device sends logs to your server, which usually works behind NAT and suits multi-branch setups. Confirm which modes your device models and firmware support.

Can I connect ZKTeco devices to payroll without special software?

Yes, in a basic way. You can export logs by USB or CSV and import them into a spreadsheet or payroll tool. It works for very small teams, but it depends on someone remembering to export, and it does not handle duplicates, shifts or corrections well.

How should I handle a missing out-punch?

Flag the day as incomplete, let a supervisor confirm the actual time, and store the correction as a logged adjustment next to the original punches. Avoid silently applying a default time unless your written policy says so.

Does HajiraPro work with ZKTeco devices?

TECFIQ describes HajiraPro as connecting ZKTeco and compatible biometric devices across branches and syncing attendance in near real time. Support depends on your specific device models and firmware, so ask TECFIQ to confirm before you buy.

Is biometric attendance data personal data I need to protect?

Treat it as sensitive personal data. Collect only what payroll needs, restrict device admin access, change default passwords, avoid exposing devices to the internet and tell employees what is stored. Check current Bangladeshi rules and take legal advice for your situation.

How do I deal with night shifts and device clock drift?

Assign punches to a shift instance rather than a calendar date, with a cut-off window for each shift. For drift, sync device clocks regularly and keep both the punch time and the server receive time so you can spot devices that are off.

When should I build a custom attendance and payroll system instead of buying one?

Build when attendance must feed an existing in-house system, when your pay rules are unusual, or when you need integrations a product does not offer. If your rules are standard, a ready product is usually faster to launch and easier to maintain.

Questions about your own project?

Tell us what you are trying to do and we will give you a straight answer, including when a ready product or a smaller engagement is the better fit.

Talk to TECFIQ