Components
Kind: view (fills its container) · Session key: taxAuthorisation · React: <FinBazeTaxAuthorisation />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { taxAuthorisation: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: tax_filings. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
Switch these off per session with components.taxAuthorisation.features.
| Feature | Default |
|---|---|
revoke | on |
hmrcConnect | on |
grant | on |
Options#
Passed to instance.create("tax-authorisation", options) or as props.
| Option | Type | |
|---|---|---|
taxes | ("nl_vat" | "nl_icp" | "nl_oss" | "nl_cit" | "nl_annual_accounts" | "nl_wage_tax" | "nl_pension" | "uk_vat" | "uk_income_tax" | "uk_annual_accounts")[] | Limit to these taxes. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
tax_authorisation.granted | onTaxAuthorisationGranted |
tax_authorisation.revoked | onTaxAuthorisationRevoked |
hmrc.connected | onHmrcConnected |
Use it#
import { FinBazeTaxAuthorisation } from "@finbaze/embed-react";
<FinBazeTaxAuthorisation />
const component = instance.create("tax-authorisation");
component.mount("#finbaze");