Components
Kind: view (fills its container) · Session key: payRuns · React: <FinBazePayRuns />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { payRuns: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: payroll. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.payRuns.features.
| Feature | Default |
|---|---|
create | on |
calculate | on |
approve | on |
finalise | on |
paymentHandoff | on |
filings | on |
Options#
Passed to instance.create("pay-runs", options) or as props.
| Option | Type | |
|---|---|---|
payRunId | string | Open this pay run instead of the list. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
pay_run.created | onPayRunCreated |
pay_run.approved | onPayRunApproved |
pay_run.selected | onPayRunSelected |
payment.requested | onPaymentRequested |
Use it#
import { FinBazePayRuns } from "@finbaze/embed-react";
<FinBazePayRuns />
const component = instance.create("pay-runs");
component.mount("#finbaze");