Components
Kind: view (fills its container) · Session key: payslipViewer · React: <FinBazePayslipViewer />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { payslipViewer: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: payroll, employee_self_service. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.payslipViewer.features.
| Feature | Default |
|---|---|
download | on |
yearDocuments | on |
Options#
Only the common options: appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
payslip.opened | onPayslipOpened |
payslip.downloaded | onPayslipDownloaded |
Use it#
import { FinBazePayslipViewer } from "@finbaze/embed-react";
<FinBazePayslipViewer />
const component = instance.create("payslip-viewer");
component.mount("#finbaze");