Developers

Payroll tax API error codes

Branch on the code, show the message.

Every error body has the same shape: a error message written for a person, a code that is stable enough to branch on, a requestId to quote to support, and for validation failures a details array. Your code should switch on code, never on the message text.

Codes your integration will meet

CodeStatus and what to do
invalid_json400. The body is not valid JSON. Fix the serialiser.
invalid_input422. A field failed validation. Read details, which names each path and reason.
unsupported_tax_year422. The check date is in a year with no rules. Use a date in a supported year; see effective dating.
cannot_compute422. The input is valid but the engine needs more, and the message names the missing certificate field. Collect that answer and retry.
missing_key401. No Authorization header was sent.
invalid_key401. The key is not recognised or has been revoked.
expired_key401. The key has expired. Issue a new one.
payment_method_required402. A live key needs a payment method on file, or the subscription is cancelled or suspended.
rate_limited429. Wait Retry-After seconds and retry.
test_daily_limit429. A test key reached its daily cap of 500. It resets at midnight UTC; a live key has no daily cap.
cannot_gross_up422, on the net-to-gross endpoint. No amount of that earning can reach the target.

A retry rule that works

Example

Sending 3000.5 instead of cents returns:

HTTP/1.1 422
{
  "error": "The request did not pass validation.",
  "code": "invalid_input",
  "details": [{ "path": "earnings[0].amount",
    "message": "must be integer cents, not 3000.5 — send whole cents (e.g. 300050 for $3,000.50), never dollars." }],
  "requestId": "req_01J9Z6Q8X3"
}

Keep reading

Payroll tax API rate limits · Payroll tax API authentication · Payroll tax request JSON Schema · Payroll tax API integration guide · All guides

Questions

What does cannot_compute mean?

The request is valid, but the engine needs an answer it was not given, usually a field on a state withholding certificate. The error message names the missing field.

Should I retry a 422?

Not unchanged. A 422 means the input needs to change, so fix the fields named in details or supply the missing certificate answer first.

How do I report a problem?

Quote the requestId from the error body, or the X-Request-Id response header, when you contact support.

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.