Developers

Testing a payroll tax API integration

Golden paychecks, edge cases, and what to do when numbers differ.

The surest way to trust an integration is to run paychecks whose answers you already know. Build a set of those as fixtures, run them in CI against a test key, and treat any change as a question to answer rather than a number to update.

Cases worth having

CaseWhat it proves
A no-income-tax state (Texas)Baseline: net $2,450.12 on $3,000.00.
A state with its own disability tax (California)State lines appear: net $2,277.06.
A city tax (Columbus, Ohio)Local lines appear: net $2,299.35.
A bonusSupplemental wages follow the flat-rate or aggregate method.
A 401(k) deferralIncome tax wages drop but Social Security wages do not.
A check at the Social Security capThe tax stops partway through a check.
A weekly and a monthly checkPay frequency changes the withholding table.
A bad requestYour error handling shows the field-level message.

Run them in CI

Use a test key, which is never billed. Store each request and the expected netPay and the expected amount for each important id. Assert on ids and cents, never on formatted strings.

test("Texas biweekly 3000", async () => {
  const { result } = await calc(texasBiweekly3000);
  expect(result.netPay).toBe(245012);
  expect(result.taxes.find(t => t.id === "US_FIT").amount).toBe(32038);
});

When a number differs from your old system

Re-run on upgrades

Rules change. Rerun the fixtures when you pin a new API version or when a new tax year starts, and review every difference. A fixture that never changes is a fixture that is not testing the new year.

Keep reading

Payroll tax API test environment · Payroll tax API integration guide · Payroll tax audit: withholding check · Payroll tax API test keys · All guides

Questions

How should I test a payroll tax integration?

Run paychecks whose answers you know against a test key, assert on tax ids and integer cents, include edge cases such as a bonus, a deferral and a Social Security cap, and review any difference when rules change.

Do test calls cost money?

No. Test keys use the same engine and data as live keys and are never billed. They are capped at 30 requests a minute and 500 a day.

Start the 14-day trial Read the docs →

14-day free trial, then $0.08 per paycheck calculation. Omnia Express calculates; it does not file, deposit tax, or give tax advice. Disclaimer.