Skip to main content

OffCycleFlow

Guided flow to create and run a bonus or correction payroll.

Remarks

Guides the user through configuring pay period dates, selecting a reason, choosing employees, and setting deduction and tax withholding preferences, then transitions into the standard payroll execution experience (configuration, overview, submission, receipts). All off-cycle payroll types share the same execution steps as regular payrolls — only the creation step differs.

Example

App.tsx
import { Payroll, type EventType } from '@gusto/embedded-react-sdk'

function MyApp() {
return (
<Payroll.OffCycleFlow
companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365"
onEvent={(eventType: EventType) => {
if (eventType === 'runPayroll/submitted') {
// Payroll submitted — navigate to your next screen
}
}}
/>
)
}

OffCycleFlowProps

Props for OffCycleFlow.

PropertyTypeDescription
companyIdstringThe associated company identifier.
onEventOnEventType<EventType, unknown>Callback invoked when the flow emits an event. See the events table on OffCycleFlow.
payrollType?OffCycleReasonOptional pre-selected off-cycle reason. When provided, the creation form starts with this reason selected.
withReimbursements?booleanOptional flag to show/hide reimbursement fields throughout the flow. Defaults to true.

Events

EventDescriptionData
breadcrumb/navigateUser navigates via the flow breadcrumb header{ key: string }
offCycle/createdOff-cycle payroll has been created and the flow transitions to execution{ payrollUuid: string }

Once the flow transitions to execution, all standard run-payroll events are emitted (e.g. runPayroll/calculated, runPayroll/submitted, runPayroll/processed).

Sub-components

ComponentDescription
OffCycleCreationCreation form for off-cycle (bonus or correction) payrolls.
PayrollExecutionFlowGuided flow to configure, review, and submit a single payroll.

Step flow

The flow opens on the creation step, where the off-cycle payroll is configured (pay period dates, reason, employees, deductions, and tax withholding). Once created, it hands off to the shared PayrollExecutionFlow for configuration, overview, submission, and receipts.

The breadcrumb header lets the user navigate from execution back to the creation step (breadcrumb/navigate with key: 'createOffCyclePayroll'). Selecting Save & exit during execution emits payroll/saveAndExit, which the flow does not handle internally — it surfaces on onEvent to signal that the flow has been exited.

Off-cycle reasons

The creation step supports two off-cycle reasons, each seeding different deduction and withholding defaults. Changing the reason updates these defaults automatically.

ReasonUseDefault deductionsDefault withholding
BonusPay a bonus, gift, or commissionSkip regular deductionsSupplemental rate
CorrectionRun a correction payment outside the scheduleInclude regular deductionsRegular rate

When deductions are skipped, all regular deductions and contributions are blocked except 401(k); taxes are always included regardless of the selection.

Endpoints