The Earning object represents an amount of money earned by an employee for work performed at a specific location. Please see our Guide on Structuring Earnings for more information about use cases.
{
"amount": "2500.00",
"piece_units": null,
"hours": 40.0,
"type": "hourly",
"code": null,
"description": null,
"earning_code": null,
"earning_rate": null,
"workplace": "wrk_TPdFwcg3AzN8UJ5hs2Ru",
"tip_credit_amount": null,
"metadata": {}
}Attribute | Description |
|---|---|
amount string | Amount earned for this earning Must be greater than 0 if type is not |
piece_units | Number of units of work produced. Required if type is |
hours | Number of hours worked for this earning Required when using an hourly-type earning |
type | Type of earning. Can be one of the following earning types in types of earnings Can be |
code | Deprecated - replaced by |
description | Readable description of the earning code that will show up on the paystub |
earning_code | The earning code ID which will be used to aggregate earnings on the paystub Can be |
earning_rate | The earning rate ID which will be used to calculate the gross wage. Required if type is |
workplace | ID of the workplace where work for this earning was performed |
tip_credit_amount | Amount of tip credit being taken by the employer. Required if the type is See Working with Tip Credit for more information |
metadata | Additional loosely structured information to associate with the earning See our Guide on Metadata for more information |
