Components
Kind: view (fills its container) · Session key: icpReturn · React: <FinBazeIcpReturn />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { icpReturn: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: tax_filings, icp_filing. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.icpReturn.features.
| Feature | Default |
|---|---|
submit | on |
inlineConsent | on |
Options#
Passed to instance.create("icp-return", options) or as props.
| Option | Type | |
|---|---|---|
period | "current" | "previous" | { year, quarter?, month? } | Which period. |
filingId | string | Open a specific filing instead. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
filing.submitted | onFilingSubmitted |
tax_authorisation.granted | onTaxAuthorisationGranted |
Use it#
import { FinBazeIcpReturn } from "@finbaze/embed-react";
<FinBazeIcpReturn />
const component = instance.create("icp-return");
component.mount("#finbaze");