Skip to main content

In this guide

  • How to preview upcoming payroll.
  • How to preview hypothetical payroll.

Preview Pending Payroll

With either the Preview Payroll by Check IDs or Preview Payroll by Check Date, Zeal allows us to get a breakdown of upcoming payroll. For this example, we’ll look at viewing upcoming payroll by check date:

Start a preview payroll job

Call Preview Payroll by Check Date with the companyID and desired check_date. This will return a job_id.

Receive updates from the Job Queue Event

When the job is finished processing, Zeal will send you an update via the Job Queue Event webhook.

Get the results of the job

Include the job_id in a call to Get Preview.
This will return a JSON object with a payload field detailing the breakdown of the payroll.

Preview Hypothetical Payroll

There are some scenarios where it’s useful to preview the breakdown of an Employee Check without first submitting it to Zeal. For example, you may want to get a view of what the net pay would be for one specific shift in a reporting period. The Preview Check Data endpoint allows us to do just this.

Preview check data

Submit an Employee Check Object to Preview Check Data (similar to how data is submitted to the Create Employee Check endpoint).
This will return JSON with a payload field detailing the breakdown of the hypothetical payroll.

Include deductions in a hypothetical preview

Preview Check Data never loads an existing Employee Check, so it does not know about deductions already saved against one. To see them in the preview, list them in the deductions array along with every shift you want counted — both the shifts already on the check and the ones you are proposing to add. Leaving a saved garnishment out is the most common reason a preview reports a higher net pay than the real check. You can pass either kind of template ID:
  • A 24-character check-scoped deduction template ID from Get Deduction Template. These apply only when you also supply a contribution amount.
  • A 32-character employee deduction template ID from List Employee Deduction Templates. These apply with their own saved contribution, so employee_contribution and employer_contribution are optional overrides.
A template is left out of the preview if it is archived, if check_date falls outside its effective date range, or if it is a Zeal-managed garnishment. Zeal-managed garnishments are already applied to the preview automatically, so passing one would withhold it twice.

Recap

  • There are two ways to preview payroll with Zeal:
    • Preview upcoming payroll - data that is in Zeal’s system awaiting processing.
    • Preview hypothetical payroll - data that is not submitted to Zeal for processing.
  • To preview upcoming payroll use the Preview Payroll by Check IDs or Preview Payroll by Check Date endpoints.
  • Previewing upcoming payroll is an asynchronous process and returns a job_id.
  • Use the Job Queue Event webhook to receive updates on a job’s status.
  • Use the Get Preview to get the results of a job.
  • To preview hypothetical payroll use the Preview Check Data endpoint.