Compensation

The Payroll API provides EmployerCompensation and EmployeeCompensation resources. The information below describes how to use the resources to view the compensation objects associated with both an employer and an employee.

EmployerCompensation

This resource allows your app to view the types of compensations provided from the employer to the employees.

EmployerCompensation object
Field Data type Description
employerCompensation.id String Unique identifier for the employer compensation.
employerCompensation.alternateIds.id` String Alternate compensation ID.
employerCompensation.name String Name of the employer compensation.
employerCompensation.type.key String Employer compensation type key.
employerCompensation.type.value String Employer compensation type value.
Read Employer Compensation

Scope: qb.payroll.compensation.read

Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  query RequestEmployerInfo {
    payrollEmployerInfo {
           employerCompensations {
           edges {
           node {
                   id
                   alternateIds {
                id
                   }
                   name
                   type {
               key
                   value
                   description
                  }
          }
          }
          }
    }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  {
          "data": {
           "payrollEmployerInfo": {
                   "employerCompensations": {
                           "edges": [
                                   {
                                           "node": {
                                                   "id": "14594506",
                                                   "alternateIds": [
                                                {
                                                                  "id": "djQuMTo5MzQxNDUxNzAzMjgzNTc4OjI4ZDA3MTdlOTY:14594506"
                                                      }
                                                 ],
                                           "name": "Salary",
                                           "type": {
                                                   "key": "SALARY",
                                                   "value": "SALARY",
                                                   "description": "SALARY"
                                           }
                                    }
                                  },
                            {
                                           "node": {
                                                   "id": "14594495",
                                                   "alternateIds": [
                                                           {
                                                                   "id": "djQuMTo5MzQxNDUxNzAzMjgzNTc4OjI4ZDA3MTdlOTY:14594495"
                                                           }
                                                   ],
                                                   "name": "Regular Pay",
                                                   "type": {
                                                           "key": "HOURLY_PAY",
                                                           "value": "HOURLY_PAY",
                                                           "description": "HOURLY_PAY"
                                                   }
                                           }
                                   },
                                   {
                                           "node": {
                                                   "id": "14594496",
                                                   "alternateIds": [
                                                           {
                                                                   "id": "djQuMTo5MzQxNDUxNzAzMjgzNTc4OjI4ZDA3MTdlOTY:14594496"
                                                           }
                                                   ],
                                                   "name": "Hourly 2",
                                                   "type": {
                                                           "key": "HOURLY_PAY",
                                                           "value": "HOURLY_PAY",
                                                           "description": "HOURLY_PAY"
                                                   }
                                           }
                                   }
                            ]
                    }
            }
    }
  }
EmployeeCompensation

This resource allows your app to view the types of compensation provided from the employer to the employees.

EmployeeCompensation object
Field Data type Description
id String Unique identifier for the employee.
alternateIds.id String Alternate compensation ID. Allows multiple domain IDs for this entity. Typically used for data migration.
alternateIds.nameSpace String Alternate compensation namespace. Typically used for data migration.
payrollEmployeeDetails.compensations.active Boolean Indicates whether the employee compensation is currently active.
payrollEmployeeDetails.compensations.id String Unique identifier for the employee compensation.
payrollEmployeeDetails.compensations.rate String Rate at which the employee compensation is paid.
payrollEmployeeDetails.compensations.rate.amount.value String Value of the employee compensation.
payrollEmployeeDetails.compensations.rate.amount.payUnit String Frequency of the employee compensation.
payrollEmployeeDetails.compensations.employerCompensation.id String Unique identifier for the employer compensation.
payrollEmployeeDetails.compensations.employerCompensation.name String Name of the employer compensation.
payrollEmployeeDetails.compensations.employerCompensation.type.key String Employer compensation type key: SALARY, HOURLY_PAY, OVERTIME, DOUBLE_OVERTIME, COMMISSION, SICK_PAY, PAID_TIME_OFF, HOLIDAY_PAY, BONUS, VACATION_PAY, UNPAID_TIME_OFF, CASH_TIPS
payrollEmployeeDetails.compensations.employerCompensation.type.value String Employer compensation type value: SALARY, HOURLY_PAY, OVERTIME, DOUBLE_OVERTIME, COMMISSION, SICK_PAY, PAID_TIME_OFF, HOLIDAY_PAY, BONUS, VACATION_PAY, UNPAID_TIME_OFF, CASH_TIPS
Read Employee Compensation

Allows reading Employer compensation info (Pay rate and Pay types)

Scope: qb.payroll.compensation.read

Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  query EmployeeCompensationQuery( $filter: WorkerManagement_EmployeeConnectionFilter) {
    workerManagementEmployees(filter: $filter) {
      edges {
        node {
          id
          firstName
          lastName
          alternateIds {
            id
            nameSpace
          }
          payrollEmployeeDetails {
            compensations {
              active
              id
              alternateIds {
                 id
                 nameSpace
              }
              rate {
                amount {
                  value
              }
              payUnit
            }
            employerCompensation {
              id
              alternateIds {
                 id
                 nameSpace
              }
              name
              type {
                key
                value
              }
            }
          }
        }
      }
    }
   }
  }

Input variable

1
2
3
4
5
6
7
  {
      "filter": {
         "employeeId": {
           "in": ["1"]
         }
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  {
    "data": {
      "workerManagementEmployees": {
        "edges": [
          {
            "node": {
              "id": "1",
              "firstName": "Employee",
              "lastName": "One Changed",
              "alternateIds": [
                {
                  "id": "djQuMTo5MTMwMzYwMzUwMjM4NzU2OjlkNjk5ZTk2MDg:1",
                  "nameSpace": "Intuit.sbseg.v4"
                }
              ],
              "payrollEmployeeDetails": {
                  "compensations": [
                  {
                    "active": true,
                    "id": "01820000-0329-0000-1C00-1CE5C7E15C4B",
                    "alternateIds": [
                      {
                        "id": "djQuMTo5MTMwMzU0NDcyOTE2Nzk2OmY1NDU1ZTBjYjM:484793419",
                        "nameSpace": "Intuit.sbseg.v4"
                      }
                    ],
                    "rate": {
                      "amount": {
                        "value": "50"
                      },
                      "payUnit": "HOURLY"
                    },
                    "employerCompensation": {
                      "id": "01820000-0361-0000-4500-02F894793D5B",
                      "alternateIds": [
                        {
                          "id": "djQuMTo5MTMwMzU0NDcyOTE2Nzk2OjI4ZDA3MTdlOTY:49823067",
                          "nameSpace": "Intuit.sbseg.v4"
                        }
                      ],
                      "name": "Regular Pay",
                      "type": {
                         "key": "HOURLY_PAY",
                         "value": "HOURLY_PAY"
                      }
                    }
                  },
                  {
                    "active": false,
                    "id": "01820000-0329-0000-1200-1CE5872D5C4C",
                    "alternateIds": [
                      {
                        "id": "djQuMTo5MTMwMzU0NDcyOTE2Nzk2OmY1NDU1ZTBjYjM:484793420",
                        "nameSpace": "Intuit.sbseg.v4"
                      }
                    ],
                    "rate": null,
                    "employerCompensation": {
                      "id": "01820000-0361-0000-4B00-02F8AE113D5C",
                      "alternateIds": [
                        {
                          "id": "djQuMTo5MTMwMzU0NDcyOTE2Nzk2OjI4ZDA3MTdlOTY:49823068",
                          "nameSpace": "Intuit.sbseg.v4"
                        }
                      ],
                      "name": "Hourly 2",
                      "type": {
                        "key": "HOURLY_PAY",
                        "value": "HOURLY_PAY"
                      }
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }