Confirm the employee is enrolled in a qualifying HDHP by checking their active health plan enrollment.
Create a company benefit of type HSA via the /v1/companies/{company_id}/company_benefits endpoint if one does not already exist.
Enroll the employee via PUT /v1/employees/{employee_id}/employee_benefits with the HSA company_benefit_id, the employee elective deferral amount per pay period, and any employer contribution amount.
Validate that the combined annual employee + employer contribution does not exceed the IRS annual HSA limit for self-only or family coverage for the tax year.
Run a payroll preview to confirm the HSA deduction appears as a pre-tax line item and the employer contribution appears as a non-taxable benefit.
Known gotchas
HSA contributions are only valid if the employee has no disqualifying coverage (e.g., enrollment in Medicare or a general-purpose FSA); the API does not check this.
The IRS annual HSA contribution limit changes each year and differs for self-only versus family HDHP coverage — hardcoding limits will cause compliance failures.
Mid-year HDHP enrollment requires pro-rating the annual limit using the last-month rule or actual months covered; no automatic pro-rating is done by the payroll API.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp