Blocks
ContractorList
Renders a tabbed list of a company's contractors split across Active, Onboarding, and Dismissed tabs, with per-row actions tailored to each tab (edit, delete, view details, dismiss, rehire, cancel a scheduled dismissal or rehire).
ManagementContractorListProps
Props for ManagementContractorList.
| Property | Type | Description |
|---|---|---|
companyId | string | The associated company identifier. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<ContractorManagementContractorList>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
initialTab? | ContractorTab | Tab to render first: Active, Onboarding, or Dismissed. Defaults to 'active'. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
contractor/create | Fired when the user clicks "Add contractor". | — |
contractor/update | Fired when the user selects "Edit"/"Review" on an onboarding-tab row. | { contractorId: string } |
contractor/view | Fired when the user selects "View details" on an active or dismissed row. | { contractorId: string } |
contractor/deleted | Fired after an onboarding-tab row's "Remove" action completes. | { contractorId: string } |
contractor/selfOnboarding/cancelled | Fired after the "Cancel self-onboarding" action updates a contractor's onboarding status. | The updated contractorOnboardingStatus returned by the API. |
contractor/dismiss | Fired when the user selects "Dismiss" on an active row. No mutation is performed by this component. | { contractorId: string } |
contractor/rehire | Fired when the user selects "Rehire" on a dismissed row. No mutation is performed by this component. | { contractorId: string } |
contractor/dismissal/cancelled | Fired after a scheduled dismissal is cancelled via the confirm dialog. | { contractorId: string } |
contractor/rehire/cancelled | Fired after a scheduled rehire is cancelled via the confirm dialog. | { contractorId: string } |
Endpoints
CreatePayment
Form for creating a contractor payment group, including date selection, per-contractor edits, preview, and submission blockers.
Remarks
Active, fully onboarded contractors are listed for the given company. Hours and bonuses apply to hourly contractors; wages apply to fixed contractors; reimbursements apply to both. The form previews the payment group before final submission and surfaces Fast ACH submission blockers when applicable.
Features:
- Payment date selection — choose the payment date; a notice shows the resulting payment speed.
- Per-contractor editing — edit hours and bonus (hourly contractors), wage (fixed contractors), and reimbursement (all) in a modal, with a running total.
- Payment method — choose Check or Direct Deposit per contractor.
- Live totals — wage, bonus, reimbursement, and overall totals update as amounts change.
- Preview before submit — review per-contractor amounts, debit amount, debit account, debit date, contractor pay date, and the submission deadline before finalizing.
- Submission blockers — Fast ACH blockers surface inline with selectable unblock options (wire transfer or slower direct deposit); submission stays disabled until every blocker is resolved.
Example
import { ContractorManagement } from '@gusto/embedded-react-sdk'
function CreateContractorPayment() {
return (
<ContractorManagement.CreatePayment
companyId="a007e1ab-3595-43c2-ab4b-af7a5af2e365"
onEvent={() => {}}
/>
)
}
CreatePaymentProps
Props for CreatePayment.
| Property | Type | Description |
|---|---|---|
companyId | string | UUID of the company for which to create a contractor payment group. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<ContractorPaymentsCreatePayment>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
contractor/payments/edit | The edit modal was opened for a contractor. | — |
contractor/payments/update | A contractor's payment values were updated locally. | The updated form values (hours, wage, bonus, reimbursement, payment method, etc.). |
contractor/payments/preview | The preview API call succeeded. | The contractor payment group preview response. |
contractor/payments/backToEdit | The user returned from preview to continue editing. | — |
contractor/payments/created | The payment group was successfully created. | The created contractor payment group response. |
contractor/payments/rfi/respond | The user clicked to respond to a payment blocker. | — |
Endpoints
PaymentHistory
Displays a contractor payment group, including each individual contractor payment, with actions to view details or cancel.
Remarks
Features:
- Payment group overview — debit date and group context in the header.
- Per-contractor table — contractor, wage type, payment method, hours, wage, bonus, reimbursement, and total for each payment.
- Row actions — view an individual contractor payment, or cancel it when the payment is cancelable.
Example
import { ContractorManagement } from '@gusto/embedded-react-sdk'
<ContractorManagement.PaymentHistory
paymentId="payment-group-uuid"
onEvent={() => {}}
/>
PaymentHistoryProps
Props for PaymentHistory.
| Property | Type | Description |
|---|---|---|
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
paymentId | string | UUID of the contractor payment group to display. |
dictionary? | Record<"en", DeepPartial<ContractorPaymentsPaymentHistory>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
contractor/payments/view/details | A row's view-details action was triggered. | { contractor: Contractor | undefined, paymentGroupId: string } — contractor is undefined if the contractor UUID is not found in the loaded list |
contractor/payments/cancel | An individual contractor payment was successfully canceled. | { paymentId: string } — the individual contractor payment UUID, not the payment group UUID passed as paymentId prop |
Endpoints
| Method | Path |
|---|---|
| DELETE | /v1/companies/:companyId/contractor_payments/:contractorPaymentId |
| GET | /v1/companies/:companyUuid/contractors |
| GET | /v1/contractor_payment_groups/:contractorPaymentGroupUuid |
PaymentsList
Displays a list of contractor payment groups for a company.
Supports viewing payment history, creating new payments, and filtering by date range. Surfaces alerts for pending information requests and wire transfer requirements.
PaymentsListProps
Props for PaymentsList.
| Property | Type | Description |
|---|---|---|
companyId | string | UUID of the company whose contractor payment groups should be listed. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
dictionary? | Record<"en", DeepPartial<ContractorPaymentsPaymentsList>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Events
| Event | Description | Data |
|---|---|---|
contractor/payments/create | User chooses to create a new payment | — |
contractor/payments/view | User selects a payment group to view | { paymentId: string } |
contractor/payments/rfi/respond | User clicks to respond to an information request alert | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/contractor_payment_groups |
| GET | /v1/companies/:companyUuid/information_requests |
PaymentStatement
Displays a single contractor's payment statement within a payment group, including wage breakdown, bonuses, reimbursements, and a receipt card for funded direct-deposit payments.
PaymentStatementProps
Props for PaymentStatement.
| Property | Type | Description |
|---|---|---|
contractorUuid | string | UUID of the contractor whose payment within the group is being displayed. |
onEvent | OnEventType<EventType, unknown> | Callback invoked each time the component emits an event — user interactions, successful API responses, step transitions, or errors. Receives the event type constant and an optional payload whose shape varies by event. See the Event Handling guide and each component's event table for the full list of emitted events. |
paymentGroupId | string | UUID of the contractor payment group the statement belongs to. |
dictionary? | Record<"en", DeepPartial<ContractorPaymentsPaymentStatement>> | Overrides for the component's i18n strings. Supply a partial object whose keys match the component's resource namespace — any omitted keys fall back to SDK defaults. See the Translation guide for details. |
Inherits children, className, defaultValues, FallbackComponent, LoaderComponent from BaseComponentInterface.
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyUuid/contractors |
| GET | /v1/contractor_payment_groups/:contractorPaymentGroupUuid |
| GET | /v1/contractor_payments/:contractorPaymentUuid/receipt |
PaymentSummary
Displays a summary of a created contractor payment group, including payment totals, debit information, contractor details, and wire transfer instructions when required.
Remarks
Features:
- Success confirmation — confirms the number of payments scheduled.
- Payment summary — total amount, debit amount, debit account, debit date, and contractor pay date, plus a per-contractor breakdown.
- Debit account — shows the company bank account used for the debit.
- Wire transfer confirmation — when a wire is required, surfaces the wire-details confirmation workflow.
PaymentSummaryProps
Props for PaymentSummary.
| Property | Type | Description |
|---|---|---|
companyId | string | UUID of the company that owns the payment group. |
onEvent | (type: EventType, data?: unknown) => void | Callback invoked when a flow event occurs, e.g. when the user exits. |
paymentGroupId | string | UUID of the contractor payment group to summarize. |
Events
| Event | Description | Data |
|---|---|---|
contractor/payments/exit | User completes the payment flow. | — |
Endpoints
| Method | Path |
|---|---|
| GET | /v1/companies/:companyId/bank_accounts |
| GET | /v1/companies/:companyUuid/contractors |
| GET | /v1/contractor_payment_groups/:contractorPaymentGroupUuid |
Utility types
ContractorTab
ContractorTab =
"active"|"onboarding"|"dismissed"
The tab currently selected on ManagementContractorList.