Generate a Link Token via the Merge API and pass it to the Merge Link UI component so the end user can authenticate their payroll provider
After the user completes the Link flow, exchange the public token for an account_token and store it securely in your database alongside the employer record
For all subsequent requests, include both Authorization: Bearer YOUR_API_KEY and X-Account-Token: YOUR_ACCOUNT_TOKEN headers
List employees with GET https://api.merge.dev/api/hris/v1/employees; use cursor-based pagination to retrieve all records
Retrieve pay statements with GET https://api.merge.dev/api/hris/v1/pay-groups or the pay-statement endpoint, filtered by employee or date range as needed
Normalize the returned Merge common data model fields to your internal schema; handle null values for fields not supported by a given provider
Known gotchas
The X-Account-Token header is per linked account — using the wrong token silently returns data for a different employer; validate the pairing at storage time
Merge's unified model normalizes fields across providers, but provider-specific fields may appear only in remote_data; check remote_data if a required field is missing from the common model
Merge performs periodic syncs (not real-time); use webhooks or check last_modified_at timestamps to detect stale data rather than assuming freshness
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