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

# Paychex Payroll Sync

> How Toku tracks pay periods and checks in Paychex Flex

Toku tracks your Paychex payroll calendar so the Toku deduction is always applied to the right pay period — and so on-chain delivery lines up with your check date.

## Pay Periods

Toku reads pay periods through Paychex's company-scoped pay periods resource, filterable by date range and status:

```bash theme={null}
curl "https://api.paychex.com/companies/<company_id>/payperiods" \
  -H "Authorization: Bearer <access_token>"
```

A trimmed, representative example response:

```json theme={null}
{
  "content": [
    {
      "payPeriodId": "00Z5V9E2NKXFP83U1WY6",
      "frequency": "SEMI_MONTHLY",
      "status": "ENTRY",
      "startDate": "2026-07-01",
      "endDate": "2026-07-15",
      "submitByDate": "2026-07-17",
      "checkDate": "2026-07-20"
    }
  ]
}
```

Individual periods are available at `/payperiods/{payperiodId}`. See the [Paychex API Developer Center](https://developer.paychex.com/) for the full schema.

## Checks

Within each pay period, Toku reads the company's checks to confirm the Toku deduction landed on the right ones:

```bash theme={null}
curl "https://api.paychex.com/companies/<company_id>/checks" \
  -H "Authorization: Bearer <access_token>"
```

Checks are either **unprocessed** (pay components can still be added, updated, or removed) or **processed** (finalized). Toku only ever writes to unprocessed checks, and uses processed checks for reconciliation.

## What Toku Reads

| Field                   | Purpose                                                    |
| ----------------------- | ---------------------------------------------------------- |
| `payPeriodId`           | Ties each Toku pay cycle to the exact Paychex pay period   |
| `startDate` / `endDate` | Determines which elections apply to the period             |
| `checkDate`             | Schedules on-chain stablecoin delivery                     |
| `submitByDate`          | Ensures the deduction is applied before payroll submission |
| `status`                | Confirms the period is finalized before Toku settles       |

## Sync Behavior

* Upcoming pay periods appear in the Toku dashboard as soon as they exist in Paychex.
* When a period's checks are processed, Toku reconciles the applied deductions against them and releases the corresponding stablecoin payments.

<Note>
  Payroll sync is read-only. Toku never creates, calculates, or submits payroll in Paychex — your team keeps full control of running payroll.
</Note>

## Next

<CardGroup cols={2}>
  <Card title="The Toku Deduction" icon="money-bill-transfer" href="/integrations/paychex/deduction">
    How the deduction is applied via pay components
  </Card>

  <Card title="Authentication" icon="lock" href="/integrations/paychex/authentication">
    OAuth 2.0 client credentials and token handling
  </Card>
</CardGroup>
