Components
Kind: view (fills its container) · Session key: vatReturn · React: <FinBazeVatReturn />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { vatReturn: { 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.vatReturn.features.
| Feature | Default |
|---|---|
submit | on |
payment | on |
suppletie | on |
inlineConsent | on |
Options#
Passed to instance.create("vat-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 |
payment.requested | onPaymentRequested |
tax_authorisation.granted | onTaxAuthorisationGranted |
Use it#
import { FinBazeVatReturn } from "@finbaze/embed-react";
<FinBazeVatReturn />
const component = instance.create("vat-return");
component.mount("#finbaze");