# Start-here prompt

Generated 2026-12-01 from the Everee docs (branch v1.0). Part of https://files.everee.com/everee-payroll-infrastructure-explainer.md

```text
GOAL
Plan, then build, a payroll workflow and UX layer inside my platform on top of Everee Payroll Infrastructure ('Payroll Infra'), which offers full-stack embedded payroll that Everee manages. My customers must never leave my product, except for Everee's embedded contract-signing screen. Everee runs payroll, taxes and filings behind the API.

READ FIRST (each page also has a Markdown version at the same URL with .md added; the docs index is https://developer.everee.com/llms.txt)
- This page: you are reading the full guide. The Developer Center follows seven areas: 1 Get your keys, 2 Onboard a company, 3 Set up the company, 4 Manage workers, 5 Run payroll, 6 After payroll, 7 Support and operate. This guide's six sections cover them as: 1 Onboard a company (and keys), 2 Set up the organization, 3 Add and maintain workers, 4 Worker payroll settings (part of managing workers), 5 Run payroll, 6 Retrieve financial data (part of after payroll). Support and operate is covered in the Developer Center page support-and-operations. The six sections are: 1 Onboard a company, 2 Set up the organization, 3 Add and maintain workers, 4 Worker payroll settings, 5 Run payroll, 6 Retrieve financial data. Each section ends with a prompt for that area.
- https://developer.everee.com/docs/payroll-infrastructure
- https://developer.everee.com/docs/introduction
- https://developer.everee.com/docs/running-payroll
- https://developer.everee.com/reference/company-onboarding-api-guide
- https://developer.everee.com/docs/authentication-api-tokens
- https://developer.everee.com/docs/events-overview
- Reference implementation for area 5: the Payroll Run Simulator at https://files.everee.com/simulators/payroll-run.html. It takes a payroll run from choosing the pay date to paid, over a mocked API and a simulated clock, with the live run, call log, signed webhooks and code for each call next to it.
- Reference implementation for area 1: the Company Signup Simulator at https://files.everee.com/simulators/company-signup.html. It is a working signup flow over a mocked API, with the live status, call log, signed webhooks and code for each call next to it. Open it, walk it once, and use it as the model for the screens and the integration behind them.

BUILD
- Step 1. Inspect my codebase and ask me what you can't see: language and framework, how I model customers, companies and workers, my job and webhook infrastructure, my secrets store, my UI framework, and which of the six areas I want first.
- Ask me these decisions, one group at a time, and write my answers into the plan: (1) Which legal entities (EINs) will run payroll, and do they need separate company instances? Each EIN is its own company with its own key and tenant ID. (2) Who signs the company's agreements, and who is the control person and each owner of 25% or more? (Needed for onboarding and identity verification.) (3) How are workers paid today: employees, contractors, or both? Hourly, salaried, or per-task? Which pay codes do you need beyond the defaults? (4) Which payroll calendar fits each customer (weekly, bi-weekly, semi-monthly, monthly) and when do pay periods start? (5) Which work locations exist, and where does each worker legally work? (The address decides tax jurisdictions.) (6) Which benefits, retirement plans and garnishments do you need to sync, and from which system? (7) Who approves payroll in your product, and what is your internal cutoff before each run's approvalDeadline? (8) Where should finance data go: a GL integration, a CSV export, or both? Which GL accounts map to which Everee transaction types? (9) Which framework, job runner, secrets store and webhook ingress do you already have?
- Data model: for each Everee ID or key, decide where it lives in my system. Use this map: Company: id (this is also the tenant ID you send in x-everee-tenant-id), company API key (secret, shown once), key IDs, webhook endpoint IDs and signing keys (secret, shown once) -> your customer or company record. Partner: partner API keys (secret): a test key and a production key -> your secrets store, not a table. Worker: workerId (Everee) and externalWorkerId (yours) -> your worker or employee record. Work location: workLocationId, and your own id as externalId -> your site or location record. Payroll calendar, approval group: payrollCalendarId, approvalGroupId -> your pay schedule and team records. Cost center, pay code: cost center key, pay code apiKey -> your own client, job or earning type. Payable: your externalId (the only idempotency key), and the paymentId in payment data -> your earning or bonus record. Funding and reports: fundingId, report run id -> your payroll run or ledger batch record. Webhook delivery: the event id from the envelope -> a processed-events table, for de-duplication.
- Step 2. Write an implementation plan in a file for me to review BEFORE writing code: data model changes (store Everee IDs next to mine), the screens you will add for each area, the API calls behind each screen, the webhooks you will handle, background jobs, and a test plan. Order the work by dependency: foundation, then areas 1 to 6.
- Step 3. After I approve, implement one area at a time using that section's prompt, verifying each against a sandbox instance before the next.

RULES
- Everee is the system of record for pay, taxes and filings. Display what the API returns. Never recompute tax, net pay or deductions yourself.
- Payroll runs are the only way to pay workers: add pay to a run with POST /payroll-runs/{id}/items, then calculate and approve it. Read every deadline from the run.
- Build every flow as a loop around reads that tell you what is left: make a change, read the state again (readiness.missing for onboarding, a run's blockers and the requirements behind them for payroll, a funding's status and resolutionInstructions), and act on what is left. Never hard-code the steps: codes appear and disappear. Map each code you know to a screen, and show resolutionInstructions for any you don't. Use webhooks (company-onboarding.status-changed, requirement.created, payroll-run.status-changed) to know when to read again, not instead of the read. A requirement does NOT open when a worker is created or changed: it opens only when a payroll calculation or a returned deposit finds the problem, so calculate runs early.
- Base URL https://api.everee.com/integration/v1. The partner key is the HTTP Basic user name for the Company Onboarding API: the test key (zk_test_...) creates and reaches only Sandbox companies and the production key (zk_prod_...), issued after Everee approves the integration, only Production companies. A company in the other environment returns 404. The company key (tsk_...) is the HTTP Basic user name for everything else, plus an x-everee-tenant-id header holding the company's id.
- Keep every key on the server. Everee rejects browser requests. Read keys from a secrets store, never log them, never hard-code them.
- Rate limit: 100 operations per 5 seconds per key (see the RateLimit-Policy header). Back off on 429.
- Only payables and payroll run items have an idempotency key (externalId). Make other creates safe yourself: look first, keep the Everee ID next to your own record.
- Test against a sandbox instance (tsk_test_... keys) before production. Nothing in a URL selects the environment; the key does. Sandbox company creation is limited (25 alive at once, 50 created in any rolling 7 days; evaluation access before the agreement is signed: 1 and 2, 14 days, companies created without an agreement), and each Sandbox company is limited to 250 workers, 100 off-cycle runs in 7 days and 100 payroll calculations in 24 hours: a refused request returns 429 with when the next can be created, and a sandbox company you no longer need can be retired.

DONE WHEN
- The plan file exists and I approved it.
- Each area works end to end against a sandbox instance, with tests, before you start the next.

If a fact you need isn't in the docs, ask me. Don't guess endpoint paths, field names or business rules.
```
