> ## 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.

# Test in the sandbox

> A separate environment with test keys and helpers that skip the waiting.

The sandbox is a complete, separate copy of Hammock. It has its own base URL, its own API keys
and its own data, and it never moves real money or opens real accounts.

| | Live | Sandbox |
| - | - | - |
| Base URL | `https://api.usehammock.co` | `https://api.sandbox.usehammock.co` |
| Key prefix | `hmk_live_` | `hmk_test_` |
| `livemode` | `true` | `false` |
| Hosted flows | Real verification and signatures | The same screens, with test data accepted |
| Bank debits | Real ACH | Simulated |

A key only works against its own environment. Objects created in one don't exist in the other.

## Test helpers

Several steps in production depend on people or on time passing: an admin completing setup,
Hammock's review, an employee enrolling, a claim being approved, ACH settlement. Test helpers
perform those steps for you. They exist only in the sandbox and return `test_helper_unavailable`
with a live key.

| Helper | Stands in for |
| - | - |
| `POST /test_helpers/employers/{id}/activate` | Hosted setup and Hammock's review. Gives the employer the benefits you list. |
| `POST /test_helpers/employees/{id}/enroll` | Hosted enrollment in one benefit. Creates the election and its deduction. |
| `POST /test_helpers/reimbursements` | A claim being submitted and approved. Creates a pending reimbursement. |
| `POST /test_helpers/payrolls/{id}/advance` | The pay date arriving and the pull settling. Moves the payroll to its next status. |

Helpers send the same events the real steps do, so you can build your webhook handling against
them.

## Scenarios worth testing

**1. The normal loop**

Follow the [quickstart](https://partners.usehammock.co/quickstart.md): enroll an employee, read deductions for a pay date,
report the payroll and advance it to `completed`.

**2. A deduction change**

Enroll an employee, then call the enroll helper again with a different amount. You receive
`deduction.updated`. Check where the new amount landed: as the current amount when the next
pay period hasn't locked, or as an `upcoming_change` when it has.

**3. A reimbursement**

Activate an employer with `dependent_care_fsa`, enroll an employee, and create a
reimbursement. List pending reimbursements, report a payroll that names it, and check that it
becomes `paid`. Then void the payroll and check that it returns to `pending`.

**4. A short paycheck**

Report a payroll with less than the deduction's `employee_amount`. The line comes back with
`"variance": "under"`.

**5. A void after the window**

Report a payroll, advance it once so the pull starts, then try to void it. You get
`payroll_not_voidable`.

**6. A failed pull**

Advance a payroll with `"outcome": "pull_failed"` and handle `pull.failed` and
`payroll.failed`.

**7. A termination**

Set an employee's `termination_date` and check that their deductions get an `end_date`.

## Hosted flows in the sandbox

Employer links and enrollment links work in the sandbox, so you can test the redirects and your
`return_url` and `refresh_url` handling end to end. The sandbox accepts test identities and test
bank accounts, and doesn't send real email to employees.


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