The Run Payroll workflow provides a complete experience for running payroll for a company. It guides users through selecting a payroll, configuring employee compensation, reviewing payroll details, and submitting the payroll for processing.
Implementation
import { Payroll } from '@gusto/embedded-react-sdk'
function MyApp() {
return <Payroll.PayrollFlow companyId="your-company-id" onEvent={() => {}} />
}
Props
Name
Type
Description
companyId Required
string
The associated company identifier.
onEvent Required
function
See events table for each subcomponent to see available events.
defaultValues
object
Optional default values for the workflow.
dictionary
object
Optional translations for component text.
Events
Event type
Description
Data
RUN_PAYROLL_SELECTED
Fired when user selects a payroll to run
{ payrollId: string }
RUN_PAYROLL_BACK
Fired when user navigates back from payroll configuration
None
RUN_PAYROLL_CALCULATED
Fired when payroll calculations are completed
None
RUN_PAYROLL_EDIT
Fired when user makes changes to payroll configuration
Run payroll components can be used to compose your own workflow, or can be rendered in isolation. For guidance on creating a custom workflow, see docs on composition.
Provides the main landing page for payroll operations, including tabs for running payroll and viewing payroll history.
import { Payroll } from '@gusto/embedded-react-sdk'
function MyComponent() {
return <Payroll.PayrollLanding companyId="your-company-id" onEvent={() => {}} />
}
Props
Name
Type
Description
companyId Required
string
The associated company identifier.
onEvent Required
function
See events table for available events.
dictionary
object
Optional translations for component text.
Events
Event type
Description
Data
RUN_PAYROLL_SUMMARY_VIEWED
Fired when user views payroll summary
{ payrollId: string }
RUN_PAYROLL_RECEIPT_VIEWED
Fired when user views payroll receipt
{ payrollId: string }
Payroll.PayrollList
Displays a list of available payrolls that can be run, including pay period dates and status information. Users can run payrolls, submit calculated payrolls, skip payrolls, and view any payroll blockers.
import { Payroll } from '@gusto/embedded-react-sdk'
function MyComponent() {
return <Payroll.PayrollList companyId="your-company-id" onEvent={() => {}} />
}
Props
Name
Type
Description
companyId Required
string
The associated company identifier.
onEvent Required
function
See events table for available events.
dictionary
object
Optional translations for component text.
Events
Event type
Description
Data
RUN_PAYROLL_SELECTED
Fired when user selects a payroll to run
{ payrollId: string }
REVIEW_PAYROLL
Fired when user selects to review a payroll
{ payrollId: string }
PAYROLL_SKIPPED
Fired when a payroll is successfully skipped
{ payrollId: string }
RUN_PAYROLL_BLOCKERS_VIEW_ALL
Fired when user views all payroll blockers
None
Payroll.PayrollHistory
Displays historical payroll records with advanced filtering and management capabilities:
Filter payrolls by time period (3 months, 6 months, or 1 year)
View payroll summaries and receipts
Cancel processed payrolls when applicable
Each payroll entry shows the pay period, payroll type, pay date, status, and pay amount
Used for editing individual employee compensation details within a payroll. This component allows modification of employee pay rates, hours, bonuses, and other compensation elements.
Displays the final payroll overview before submission, including totals, employee details, and submission controls. Once submitted, it tracks the processing status and displays confirmation when complete.
Displays a detailed receipt for a completed payroll, including all payment information, deductions, taxes, and totals. This component provides a comprehensive view of a processed payroll for record-keeping and review purposes.
import { Payroll } from '@gusto/embedded-react-sdk'
function MyComponent() {
return <Payroll.PayrollReceipts payrollId="your-payroll-id" onEvent={() => {}} />
}
Props
Name
Type
Description
payrollId Required
string
The associated payroll identifier.
onEvent Required
function
See events table for available events.
showBackButton
boolean
Optional flag to show back button. Defaults to true.
dictionary
object
Optional translations for component text.
Events
Event type
Description
Data
RUN_PAYROLL_BACK
Fired when user navigates back
None
Payroll.PayrollBlocker
Displays a list of blockers that prevent payroll from being processed. Blockers indicate issues that must be resolved before a payroll can be calculated or submitted, such as missing employee information, invalid tax setups, or incomplete company configuration.
import { Payroll } from '@gusto/embedded-react-sdk'
function MyComponent() {
return <Payroll.PayrollBlocker companyId="your-company-id" onEvent={() => {}} />
}
Props
Name
Type
Description
companyId Required
string
The associated company identifier.
onEvent Required
function
See events table for available events.
dictionary
object
Optional translations for component text.
Events
This component does not emit any events. It displays blockers fetched from the API and provides information to help users resolve issues.
Payroll.ConfirmWireDetails
Provides the wire transfer confirmation workflow for payroll funding. This component displays a banner when wire transfers are awaiting funds and allows users to view wire instructions and confirm transfer details through a modal interface.