March 30, 2021
June 22, 2021

Announcing earning codes

by 
Ian Zapolsky
March 30, 2021
June 22, 2021

Announcing earning codes

by 
Ian Zapolsky

Employers running payroll often want the flexibility to customize labels for certain earnings, in such a way that will flow through to their employees’ paystubs. For example, imagine a restaurant that wants to pay employees for waiting tables and washing dishes. The restaurant might want those paystubs to reflect those details. In fact, ever since Check’s first API users began building on top of our platform, the desire to add custom earning codes has resurfaced again and again. So we're excited to announce the Earning Codes API!

Before Earning Codes, our initial support for custom labels on earnings took a “stateless” approach, meaning users could pass us a description and code field with each earning, which we would use for aggregation on the paystub.

However, there were a couple downsides of this approach. First, it pushed the complexity of maintaining the list of eligible descriptions and codes for a company onto our partners. Second, it prevented Check from actually knowing what earning codes were eligible for a company, which impacted our ability to accurately ingest historical payroll data with a multitude of earning codes, as well as provide high-quality accounting integrations.

With the Earning Code API, partners can create a list of earning codes for each company, which can then be used during the creation of earnings for that company’s employees. The Earning Codes API is now live and ready to be used by all our partners. We plan to deprecate the “code” field on the payroll item earning object in future API versions.

For a glimpse at Earning Codes in action, take our restaurant example. You can now create two earning codes in Check’s API:


curl -XPOST https://api.checkhq.com/earning_codes -d '{
    "company": "com_dsE2Y4wCMg77HGlJB0Mk",
    "type": "hourly",
    "name": "Dishwasher"
}'

curl -XPOST https://api.checkhq.com/earning_codes -d '{
    "company": "com_dsE2Y4wCMg77HGlJB0Mk",
    "type": "hourly",
    "name": "Waiter"
}'

These two requests will return Earning Code objects with IDs. These can then be listed like so:


{
    "next": null,
    "previous": null,
    "results": [
        {
            "id": "erc_ijKMqS3u8MAgQdoGIip6",
            "company": "com_dsE2Y4wCMg77HGlJB0Mk",
            "type": "hourly",
            "name": "Dishwasher"
        },
        {
            "id": "erc_a65eL6JLz5dSBjuddDwL",
            "company": "com_dsE2Y4wCMg77HGlJB0Mk",
            "type": "hourly",
            "name": "Waiter"
        }
    ]
}

These earning codes can now be used within the earnings for employees on a payroll item, instead of a type, code, and description. Whereas before one might have had to send:


{
    "type": "hourly",
    "description": "Dishwasher",
    "code": "dishwasher",
    "amount": "100.00",
    "hours": 10.0
},
{
    "type": "hourly",
    "description": "Waiter",
    "code": "waiter",
    "amount": "100.00",
    "hours": 10.0
},

Now, with earning codes, you can send:


{
    "earning_code": "erc_ijKMqS3u8MAgQdoGIip6",
    "amount": "100.00",
    "hours": 10.0
},
{
    "earning_code": "erc_a65eL6JLz5dSBjuddDwL",
    "amount": "100.00",
    "hours": 10.0
}

Find out how payroll can power your growth.

Contact us to schedule a discovery session about 
working with Check.
Contact Us >