> ## Documentation Index
> Fetch the complete documentation index at: https://partners.usehammock.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Hammock Partner API

> Offer Hammock benefits inside your payroll product.

The Partner API lets a payroll platform offer Hammock's benefits to its customers: health savings
accounts, flexible spending accounts, ICHRA, lifestyle spending accounts and more. You keep the
employer relationship and the payroll. Hammock opens and administers the accounts, runs
enrollment, reviews claims and moves the money.

## How the pieces fit

```mermaid theme={null}
sequenceDiagram
  participant P as Your platform
  participant H as Hammock
  participant E as Employer and employees
  P->>H: Create the employer, pay schedule and roster
  H->>E: Hosted setup and hosted enrollment
  H-->>P: Events as employees enroll
  P->>H: Read deductions and pending reimbursements
  P->>P: Run payroll
  P->>H: Report the payroll
  H->>E: Fund accounts from the employer's bank
```

| You build | Hammock provides |
| - | - |
| Creating employers and syncing the roster | Hosted employer setup: verification, agreements, bank link |
| Links into setup and enrollment from your product | Hosted enrollment, and the member app, cards and claims |
| Applying deductions and paying reimbursements in payroll | The amounts: what to withhold, contribute and reimburse |
| Reporting each payroll | Funding: ACH pulls from the employer and posting to accounts |
| A webhook endpoint | Events for everything that changes |

## What each benefit puts on a paycheck

| Benefit | Standing deduction | Reimbursement through payroll |
| - | - | - |
| HSA (`hsa`) | Pre-tax, with an optional employer contribution | None |
| Health FSA (`health_fsa`) | Pre-tax, with an optional employer contribution | None |
| Limited purpose FSA (`limited_purpose_fsa`) | Pre-tax, with an optional employer contribution | None |
| Dependent care FSA (`dependent_care_fsa`) | Pre-tax, with an optional employer contribution | Non-taxable |
| ICHRA (`ichra`) | The employee's share of a premium, when there is one | Non-taxable, on plans that reimburse expenses |
| Lifestyle spending account (`lsa`) | None | Taxable |
| HRA, COBRA, wellness | None | None |

Benefits that put nothing on a paycheck still appear as [benefits and elections](https://partners.usehammock.co/guides/benefits-and-elections.md),
so you can show employees what they have.

## Design principles

The API follows conventions you may know from Stripe:

* **Predictable objects.** Every object has an `id` with a type prefix, an `object` field and a
  `livemode` flag. Amounts are integer cents.
* **Structured errors.** Every error has a `type`, a stable `code` and the `param` at fault. See
  [errors](https://partners.usehammock.co/api/errors.md).
* **Safe retries.** Send an `Idempotency-Key` with any `POST`. See [idempotency](https://partners.usehammock.co/api/idempotency.md).
* **Thin events.** Webhooks tell you what changed and you fetch the current object. See
  [events and webhooks](https://partners.usehammock.co/webhooks/overview.md).
* **Dated versions.** The API is versioned by date with a `Hammock-Version` header, not a path
  prefix. See [versioning](https://partners.usehammock.co/api/versioning.md).

## Next steps

> [card] [Quickstart](https://partners.usehammock.co/quickstart.md)
>
> Run one employee through enrollment and a payroll in the sandbox.

> [card] [Report a payroll](https://partners.usehammock.co/guides/payrolls.md)
>
> The core loop: deductions out, actuals in.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.