Available for the following plans: Employment Lite, Employment Plus
Available for the following Payroll plans: Standard, Premium
Available for the following user access levels: Admin
Webhooks allow web applications to communicate in real-time by sending data from one application to another whenever an event occurs. It is done through a webhook URL provided by the receiving application, acting as a phone number for the event to be sent to.
You can use the Payroll Webhooks feature to add a new Webhook to your organisation's payroll classic platform and then test this data source out to make sure it works as intended. You can also use this feature to edit any information if it changes and delete a record if it is no longer required.
Getting started
Daily activities
Editing data
Removing data
Further information
The Web Hook events with message data types sent that are currently available are:
- Employee Created (NzUnstructuredEmployeeModel)
- Employee Terminated (NzUnstructuredEmployeeModel)
- Employee Updated (NzUnstructuredEmployeeModel)
- Pay-Run Finalised (FinalisePayRunOptions)
- Pay Run Deleted (pay run ID)
- Pay-Run Initialised (PayRunModel)
- Bank Account Deleted (bank account ID)
- Bank Account Updated (NzBankAccountModel)
- Employee Recurring Deduction Deleted (deduction ID)
- Employee Deduction Updated (NzEmployeeRecurringDeductionModel)
- Leave Request Approved (UnitLeaveRequestResponseModel)
- Leave Request Created (NzUnitLeaveRequestModel)
- Leave Request Deleted (UnitLeaveRequestResponseModel)
- Leave Request Declined (UnitLeaveRequestResponseModel)
- Leave Request Updated (NzUnitLeaveRequestModel)
Data is sent inside a wrapper class (Microsoft.AspNet.WebHooks.WebHookWorkItem), with the relevant data inside the Notification array.
If the call to the web hook URL does not return a success result, for example a HTTP 200 or HTTP 201, we will retry the sync at increasingly higher delays.
- First attempt: Immediate.
- Retry 1: 1 minute after first attempt.
- Retry 2: 2 minutes after previous retry.
- Retry 3: 4 minutes after previous retry.
- Retry 4: 8 minutes after previous retry.
- Retry 5: 15 minutes after previous retry.
- Retry 6: 30 minutes after previous retry.
- Retry 7: 1 hour after previous retry.
If the web hook attempt is not successful after seven retries, we will not re-attempt the sync.
We include Web Hook message verification with each web hook registration by computing a sha256 hash of the message payload using HMAC and web hook secret. Each event will contain the hashed value within the header response MS-Signature. You can use an application like https://www.freeformatter.com/hmac-generator.html to test the resulting hash.
Please note the hash is sensitive to any whitespace in the request content. It is recommended that you read the content as a string without any formatting, then pass it through an HMAC hash generator library along with your secret.
Explore related content
- Set up and manage your organisation's calendar feed in payroll classic This feature allows you to turn a payroll event into a calendar feed, and then copy the link to this data source into, for example, Outlook.
- Email sender authentication in payroll classic This feature allows you to set up DKIM (Domain Keys Identified Mail) on a domain of your choice for emails sent via the platform.