HR & payroll
Gusto mock API
Gusto Embedded Payroll API: employees with optimistic versioning, locations, payroll prepare/calculate/submit lifecycle and verified, HMAC-signed webhook subscriptions.
At a glance
- Operations
- 316
- Stateful operations
- 24
- Stateful resources
- 4
- Webhook events
- 7
- Vendor API version
- 2026-06-15
- Verification
- Spec-verified
How it works
Use Gusto without calling Gusto, Inc.
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Bearer example_gusto_access_token State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Employees | 6 |
| Locations and company | 5 |
| Payrolls | 6 |
| Webhook subscriptions | 7 |
Webhooks
Events your handlers can receive
- employee.created
- employee.terminated
- employee.updated
- payroll.submitted
- payroll.processed
- payroll.paid
- webhook_subscription.verification_token
Deliveries are signed with the hmac scheme, so your verification code runs unchanged.
Coverage
316 operations
24 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 292 |
| Webhook subscriptions | 7 |
| Employees | 6 |
| Payrolls | 6 |
| Locations and company | 5 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
5 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the Gusto, Inc. API description, licensed under none declared.
- Gusto, Inc. API documentation
- Source specification
Each collection (employees, locations, payrolls, webhook subscriptions, superseded versions) holds up to 1 MiB per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). One company is seeded per caller. Employees, locations, payrolls and webhook subscriptions are stateful; every other vendor operation (contractors, benefits, tax setup, reports and so on) is a schema-valid stateless sample, and creating a payroll through the vendor operation is stateless. Pages use page and per with X-Page, X-Per-Page and X-Total-Count headers. Optimistic locking: employees and locations carry a version that changes on every PUT; a PUT with the version that was just superseded, or with no version, is 409; an arbitrary unknown version is accepted and only the latest superseded version per record is remembered. Employees: the terminated filter works, search_term matches the last name only, DELETE is only allowed for never-onboarded employees, terminations set terminated and change the version (a PUT with the pre-termination version is 409); terminating an already terminated employee is 422 and emits no event. Payrolls follow prepare, calculate, submit; calculate before prepare, submit before calculate and a repeated submit are 422; cancel is allowed for calculated or submitted payrolls (the vendor only cancels processed ones); submit marks the payroll processed immediately. The delayed payroll.processed and payroll.paid events are scheduled at submit time and cannot be gated on later state, so they are still delivered if the payroll is cancelled within about a second of submitting. Webhook subscriptions start pending: the verification_token is delivered to the URL on create and on GET request_verification_token (this pack also returns it in that response so scenarios can read it); PUT verify accepts any token and enables delivery of employee.created, employee.updated, employee.terminated, payroll.submitted, payroll.processed (about 0.4 s later) and payroll.paid (about 0.8 s later). Deliveries are signed with X-Gusto-Signature (hex HMAC-SHA256 of the raw body keyed by the verification_token). X-Gusto-API-Version other than 2026-06-15 is a 400 on the stateful routes; an absent header is accepted. A subscription URL is only rejected when it has a non-http(s) scheme. Errors use {errors:[{error_key,category,message}]}. Rate limits (429) are not modelled.
MaxoPerf is not affiliated with, endorsed by, or sponsored by Gusto, Inc. Gusto is a trademark of its owner.