OmniaExpress Docs API status Dashboard

POST /v1/paycheck

Calculate a paycheck

Returns each federal, state and local tax for one paycheck, plus totals and net pay. All amounts are integers in cents.

The body is described by a JSON Schema, and the whole API by an OpenAPI 3.1 document. Import either into your editor, client generator or Postman. Both are generated from the same lists the server validates against, so a value they allow is a value the API accepts.

Money is integer cents: $3,000.00 is 300000. A decimal such as 3000.5 is a 422 that says so. Rates are decimals: 0.031 is 3.1%. Dates are YYYY-MM-DD.

Body

checkDate stringrequiredPay date, YYYY-MM-DD. Picks the tax year.
payPeriodStart stringFirst day of the pay period, YYYY-MM-DD, on or before checkDate. Only local taxes whose ordinance starts with a pay period read it (Whitesville KY, Springfield OR); everything else keys to checkDate.
payFrequency stringrequiredOne of weekly, biweekly, semimonthly, monthly, quarterly, semiannual, annual or daily.
earnings arrayrequired{ code, category, amount } per earning line. amount is cents.
deductions arrayrequiredPretax and posttax deductions, amounts in cents. Send [] when there are none.
federalW4 objectrequiredAll six fields are required: filingStatus, multipleJobs, dependentCredit, otherIncome, deductions, extraWithholding. Dollar fields are cents. For an employee still on a 2019-or-earlier W-4, send legacyAllowances (the line 5 count) with multipleJobs false, the credit and income fields at 0, and filingStatus single or married_joint.
ytd objectrequiredYear-to-date socialSecurity, medicare, and futa wages, in cents. Send zeros at the start of the year. Add electiveDeferrals { section402gAggregate, deferral457, simple } to apply the annual retirement limit; without it every deferral is treated as the first of the year.
employee objectageAtYearEnd: the age the employee reaches by December 31. 50 and over raises the 401(k), 403(b), 457(b) and SIMPLE limits; 60 through 63 raises them further. Without it the standard limits apply and a capped deferral carries a warning.
workState objectrequired{ code, certificate }. Pennsylvania uses workPSD and residencePSD.
residenceState object{ code, certificate } for where the employee lives, when it differs from workState. residenceStateWithholding { nexus, voluntary } says whether that state also withholds.
employer objectFacts only the employer has. stateUnemploymentRate is your assigned rate by state, e.g. { "OH": 0.031 }; without it the state's new-employer rate is used and the line says so.
employmentCategory stringstandard (default), clergy, statutory_employee, household, agricultural, railroad or election_worker. A misspelling is a 422.
priorRegularPayment objectFor a bonus paid apart from regular pay: { taxableWages, stateIncomeTaxWithheld } of the check it is aggregated with.
roundToWholeDollars booleanRound state withholding to whole dollars where the state requires it.
minimumWageCheck object{ hourlyRate } in cents, compared with wage floors on the same call. Optional: locality, employeeCount, tipped, region, occupation. American Samoa has no single minimum wage, so it also needs industry (for example garment); without it the check is refused.
garnishments arrayOrders: consumer_creditor, child_support, federal_student_loan_default, federal_nontax_debt, federal_tax_levy, state_tax_levy, chapter_13_bankruptcy, medical_support. amountOrdered is cents. Each type has its own fields; see the API reference.

Response

The HTTP body wraps the engine result: { "result": PaycheckResult }.

grossPayTotal earnings in cents.
taxes{ id, name, payer, jurisdiction, taxableWages, amount, detail }.
employeeTaxTotalSum of employee taxes, in cents.
employerTaxTotalSum of employer taxes, in cents.
netPayGross minus employee taxes and deductions, in cents.
notices, warningsReturned when an input needs a second look. warnings also names any request field the API did not read, with the field you probably meant, so a misspelled optional field is not silent.

Errors

StatusCodeMeaning
400invalid_jsonThe body is not valid JSON.
401missing_keyNo API key was sent.
401invalid_keyThe key is wrong or inactive.
401expired_keyThe key passed its expiry date.
402payment_method_requiredNo card or bank account on file.
402subscription_cancelledThe subscription was cancelled. Start a new one in the console.
402account_suspendedA payment failed and the key is paused. Update the payment method.
422invalid_inputThe body failed validation. See details.
422unsupported_tax_yearNo rules for the year of checkDate.
422cannot_computeThe input is valid but the engine cannot compute it, for example a missing certificate field. The message says which.
429rate_limitedToo many requests this minute. Retry later.