PayOptions form the basis of your payroll. Before getting in to the specifics of the object, let's look at how it's used.
Employers have a property called DefaultPayOptions.
If you create a new Employee without setting the PayOptions
property then the DefaultPayOptions from the Employer will be used (which you can then modify if you want to).
When you start a new PayRun it contains a PayRunEntry for each Employee along with the employees' PayOptions property.
You can modify the PayOptions property of a PayRunEntry without affecting the PayOptions property of the Employee .
Four properties of the PayOptions model determine the basic pay amount of an employee.
period | period |
payAmount | payAmount |
basis | basispayAmount is an Daily or Hourly rate then you should set this accordingly. If however it's a set amount for the period then leave this set to Monthly
|
payAmountMultiplier | payAmountMultiplierbasis is Monthly.
But if the basis is Daily or Hourly
then this property sets how many days/hours the employee should be paid for in the period.
|
To illustrate the above, here are a few examples
{
...
"payOptions": {
"period": "Monthly",
"basis": "Monthly",
"payAmount": 3000.00,
"payAmountMultiplier": null,
...
},
}{
...
"payOptions": {
"period": "Weekly",
"basis": "Hourly",
"payAmount": 15.00,
"payAmountMultiplier": 40,
...
},
}{
...
"payOptions": {
"period": "Monthly",
"basis": "Daily",
"payAmount": 110.00,
"payAmountMultiplier": 20,
...
},
}The boolean property NationalMinumumWage property can only be set to true if the basis is Hourly.
If this is enabled then the PayAmount (which would be the hourly rate) has no effect. Instead we'll work out the appropriate minimum wage for the employee based on their age at the start of each pay run
As well as the basic pay amount detailed above, you may want to add additional lines to deduct or add an amount to an employees pay.
This is where the RegularPayLines property comes in.
RegularPayLines is an array of PayLines .
The three main properties of the PayLine are as follows:
{
...
"payOptions": {
"period": "Monthly",
"basis": "Monthly",
"payAmount": 3000.00,
"payAmountMultiplier": null,
"regularPayLines": [
{
"value": 50.0,
"description": "Performance bonus for October",
"code": "BONUS"
}
],
...
},
}PayOptions contains other important properties which should be self-explanatory from their names.
Many of them are used to populate the FPS sent to HMRC. But important properties to note that affect the final pay calculations are
those within the TaxAndNi object.
Ordinal property is explained here.
Below is a full Employee model with the PayOptions set.
{
"personalDetails": {
"title": "Mr",
"firstName": "Benedict",
"lastName": "Cumberbatch",
"dateOfBirth": "1976-07-19",
"gender": "Male",
"maritalStatus": "Married",
"address": {
"line1": "221B Baker Street",
"line2": "Marylebone",
"line3": "London",
"postCode": "NW1 6XE",
"country": "England"
}
},
"employmentDetails": {
"payrollCode": "1",
"starterDetails": {
"startDate": "2018-04-01",
"starterDeclaration": "A"
}
},
"payOptions": {
"period": "Monthly",
"ordinal": 1,
"basis": "Monthly",
"method": "Credit",
"payAmount": 3000.00,
"payAmountMultiplier": null,
"taxAndNi": {
"niTable": "A",
"studentLoan": "None",
"taxCode": "1185L",
"week1Month1": false
},
"fpsFields": {
"hoursNormallyWorked": "LessThan16"
}
}
}GET the full model you want to modify,
make changes to the JSON data and then PUT
that data with the relevant API call.