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

# Pay schedules and lock dates

> Tell Hammock how an employer pays, and learn when each pay period locks.

You own the payroll calendar. Hammock keeps a copy of each pay schedule for three reasons:

* **Sizing deductions.** An annual election is split across the paydays left in the plan year.
* **Lock dates.** A deduction change needs a clear answer to "which paycheck does this land on?"
* **Timing.** ICHRA funding is scheduled ahead of each payday, and Hammock can tell when a payroll
  report is overdue.

## Create a pay schedule

```bash theme={null}
curl https://api.usehammock.co/pay_schedules \
  -H "Authorization: Bearer hmk_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 25b97dd0-f9e5-4033-9fdf-1290c75d5153" \
  -d '{
    "employer": "empr_1Qx8Zt2eZvKYlo2C",
    "external_id": "schedule_semimonthly",
    "frequency": "semimonthly",
    "pay_date_offset_days": 4,
    "holiday_rule": "previous_business_day",
    "lock_offset_business_days": 2
  }'
```

| Field | Meaning |
| - | - |
| `frequency` | `weekly`, `biweekly`, `semimonthly` or `monthly` |
| `anchor_period_end_date` | The last day of any one real pay period. Required for `weekly` and `biweekly`. |
| `pay_date_offset_days` | Calendar days from the end of a pay period to its payday |
| `holiday_rule` | Where a payday moves when it lands on a weekend or bank holiday |
| `lock_offset_business_days` | Business days before payday that the period locks. Defaults to 2. |

Semimonthly periods run from the 1st to the 15th and from the 16th to the end of the month.
Monthly periods follow the calendar month.

Every employee belongs to one pay schedule. An employer can have one schedule per frequency in
this preview.

## The lock date

Each pay period has a lock date: its payday, less `lock_offset_business_days`. Set the offset to
match the point where your payroll stops accepting changes, which is usually your approval
deadline.

The lock date does two jobs:

1. **It's the cutoff for deduction changes.** A change made on or before a period's lock date
   applies on that period's payday. A later change applies from the next one.
2. **It's when you report the payroll.** See [report payrolls](https://partners.usehammock.co/guides/payrolls.md).

## Check the calendar

List the pay periods Hammock derives from a schedule, and compare them with your own.

```bash theme={null}
curl "https://api.usehammock.co/pay_periods?pay_schedule=ps_7Hn3Kd9sLq2W&from=2027-03-01&to=2027-03-31" \
  -H "Authorization: Bearer hmk_live_..."
```

```json theme={null}
{
  "object": "list",
  "url": "/pay_periods",
  "has_more": false,
  "data": [
    {
      "object": "pay_period",
      "pay_schedule": "ps_7Hn3Kd9sLq2W",
      "start_date": "2027-03-01",
      "end_date": "2027-03-15",
      "pay_date": "2027-03-19",
      "lock_date": "2027-03-17"
    },
    {
      "object": "pay_period",
      "pay_schedule": "ps_7Hn3Kd9sLq2W",
      "start_date": "2027-03-16",
      "end_date": "2027-03-31",
      "pay_date": "2027-04-02",
      "lock_date": "2027-03-31"
    }
  ]
}
```

## When the calendar changes

The amounts you report are never affected by Hammock's copy of the schedule: each payroll report
carries its own pay period and pay date. A stale schedule affects timing only.

* **One payday moves.** Report the payroll with the real pay date. Nothing else is needed.
* **The schedule changes.** Update the pay schedule before the next lock date so lock dates and
  ICHRA funding follow the new calendar.
* **The frequency changes.** Frequency can't change once employees on the schedule have
  elections, because their per-paycheck amounts were sized for it. Create a new schedule and move
  the employees to it. Their deductions are resized and you receive `deduction.updated` events.


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