FinBaze for Platforms

Components

Kind: view (fills its container) · Session key: salesInvoices · React: <FinBazeSalesInvoices />

Create the session#

mutation {
  createEmbedSession(input: {
    companyId: "…"
    user: { externalUserId: "…" }
    components: { salesInvoices: { enabled: true } }
  }) { clientSecret }
}

Requirements#

The company must have these features effective: sales_invoices. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.

Component features#

Switch these off per session with components.salesInvoices.features.

FeatureDefault
createon
sendon
crediton
exporton

Options#

Passed to instance.create("sales-invoices", options) or as props.

OptionType
status"all" | "draft" | "open" | "overdue" | "paid"Which invoices the list starts on.
invoiceIdstringOpen this invoice instead of the list.
customerIdstringOnly this customer's invoices.

Every component also takes appearance and navigation ("internal" or "external").

Events#

EventReact prop
readyonReady
navigateonNavigate
erroronError
invoice.sentonInvoiceSent
invoice.creditedonInvoiceCredited
invoice.selectedonInvoiceSelected

Use it#

import { FinBazeSalesInvoices } from "@finbaze/embed-react";

<FinBazeSalesInvoices />
const component = instance.create("sales-invoices");
component.mount("#finbaze");