The Deductions API lets a benefits administration platform keep a worker's recurring deductions in Everee in sync with its own records. You can start, change and end deductions without anyone working in Everee.
There are three endpoints, one for each kind of deduction. They work the same way and differ in which pay codes and amount options they accept.
| Endpoint | Use it for |
|---|---|
| Apply benefit deduction | Benefit plans: medical, dental, vision, HSA, FSA, life, disability and similar |
| Apply other deduction | Other recurring deductions: dues, savings, loan repayments |
| Apply retirement deduction | Retirement plans: 401(k), 403(b), IRAs |
One request to start, change or end
Each endpoint is a single POST that does the right thing based on which dates you send:
| You send | What happens |
|---|---|
effectiveDate | The deduction is created, or updated if it already exists |
effectiveDate and effectiveEndDate | The same, with an end date |
Only effectiveEndDate | The existing deduction is ended |
| Neither | The request is rejected |
A deduction is identified by the worker and the pay code, so you don't store any Everee deduction ID. For other deductions you also supply an externalId, because a worker can have more than one deduction of the same type.
Changing a deduction
- If the worker has no deduction for that pay code, or their last one ended before your
effectiveDate, a new one is created. - If the existing deduction hasn't been used in a finalized payroll yet, it's updated in place.
- Otherwise the existing deduction is ended the day before your
effectiveDate, and a new one starts on it. This keeps past payrolls unchanged.
The start date can't be earlier than the worker's earliest editable date. If it is, it's moved forward to that date. The response always contains the dates that were actually used.
Ending a deduction
To end a deduction, send the workerId and payCode (and externalId) with only an effectiveEndDate. The deduction must exist and still be active or upcoming, otherwise you get a 404. A deduction that was never used in a finalized payroll is removed entirely, and its response still returns the start date and the end date you sent. One that was used is ended on the date you gave, or the earliest date that's still editable.
The response
Each response echoes workerId and payCode (and externalId), along with:
status:ACTIVE, orENDEDif the end date is today or earlier in the company's time zoneeffectiveDateandeffectiveEndDate: the dates that now apply
Amounts
Send exactly one of deductionAmount or deductionPercentage. Which one a pay code allows is listed below. Sending both, neither, or one the pay code doesn't allow returns a 422.
Fixed amounts (deductionAmount) are amounts per period. Send the amount with the periodType it applies to (WEEKLY, BI_WEEKLY, SEMI_MONTHLY or MONTHLY). For companies that deduct a monthly amount, Everee converts it to a monthly total: the amount times the number of periods in a year, divided by 12. Companies configured to deduct on every payment have the amount applied as sent, per payment. Use employerAmount for any employer contribution. It defaults to zero.
Percentages (deductionPercentage) are decimal fractions, not whole percentages: send 0.05 for 5%. Use employerPercentage for any employer contribution. An optional limit caps the dollar amount deducted per payment, per month or per pay period.
lifetimeLimit caps the total deducted from the worker over the life of the deduction. It's available on the benefit and other deduction endpoints.
Retirement employer match
The retirement endpoint doesn't take an employer amount or percentage. Describe the employer's match with employerMatchTiers instead: an ordered list of tiers, each with a matchRate and the share of wages (percentOfWages) it covers. Both are decimal fractions. For example, a 100% match on the first 3% of wages and a 50% match on the next 2% is:
"employerMatchTiers": [
{ "matchRate": 1.0, "percentOfWages": 0.03 },
{ "matchRate": 0.5, "percentOfWages": 0.02 }
]Match tiers aren't accepted for state retirement plan Roth 401(k) or PAYROLL_DEDUCTION_IRA pay codes.
HSA limit
For HSA deductions, hsaLimitType sets whether the contribution limit is INDIVIDUAL or FAMILY. If you leave it out, the worker's existing limit type is kept. Sending it with any other pay code is rejected.
Pay codes
The payCode says what kind of deduction this is. Use one of the values below, or the apiKey of a custom pay code your company has set up for one of these deduction types. Each endpoint only accepts its own types. Anything else returns a 404.
Benefit deductions
All benefit deductions use deductionAmount.
| Pre-tax | ACCIDENT_INSURANCE, CANCER_INSURANCE, COMMUTER_PLAN, CRITICAL_ILLNESS_INSURANCE, DENTAL_INSURANCE, DRA, FSA, GROUP_LIFE_INSURANCE, VOLUNTARY_LIFE_INSURANCE, HOSPITAL_INDEMNITY_INSURANCE, HRA, HSA, MEDICAL_INSURANCE, MEDICAL_INSURANCE_SECONDARY, MEDICARE_SUPPLEMENT_PLAN, PRESCRIPTION_PLAN, VISION_INSURANCE, LONG_TERM_DISABILITY_INSURANCE, SHORT_TERM_DISABILITY_INSURANCE |
| Post-tax | LONG_TERM_DISABILITY_INSURANCE_POST_TAX, SHORT_TERM_DISABILITY_INSURANCE_POST_TAX, MEDICAL_INSURANCE_POST_TAX, DENTAL_INSURANCE_POST_TAX, VISION_INSURANCE_POST_TAX, ACCIDENT_INSURANCE_POST_TAX, VOLUNTARY_LIFE_INSURANCE_POST_TAX, GROUP_LIFE_INSURANCE_POST_TAX, CRITICAL_ILLNESS_INSURANCE_POST_TAX, HOSPITAL_INDEMNITY_INSURANCE_POST_TAX |
Other deductions
payCode | Amount |
|---|---|
DUES | deductionAmount or deductionPercentage |
EMERGENCY_SAVINGS | deductionAmount or deductionPercentage |
LOAN_REPAYMENT | deductionAmount |
LOAN_REPAYMENT_401K | deductionAmount |
OTHER_POST_TAX_DEDUCTION | deductionAmount |
NEW_YORK_FAMILY_LEAVE_INSURANCE | deductionPercentage |
Retirement deductions
All of these accept deductionAmount or deductionPercentage.
ERISA_401K, ROTH_401K, ERISA_403B, TRADITIONAL_IRA, SIMPLE_IRA, SIMPLE_IRA_POST_TAX, PAYROLL_DEDUCTION_IRA, and state retirement plan Roth 401(k)s.
State retirement plan Roth 401(k)s are sent with a two-letter state prefix, like CA_STATE_RETIREMENT_PLAN_ROTH_401K. The prefix must be one of the participating states: CA, CO, CT, DE, IL, ME, MD, MN, NJ, NV, NY, OR, RI, VA or VT. The unprefixed STATE_RETIREMENT_PLAN_ROTH_401K is rejected.
Errors
| Status | Cause |
|---|---|
400 | effectiveEndDate is before effectiveDate |
404 | The payCode isn't valid for the endpoint, or you tried to end a deduction that doesn't exist or has already ended |
422 | Neither date was sent; the amount options are wrong for the payCode; hsaLimitType was sent for a pay code other than HSA; the state prefix is invalid; or a required field is missing |