Components
Kind: element (inline) · Session key: receiptDropzone · React: <FinBazeReceiptDropzone />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { receiptDropzone: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: process_documents. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
None.
Options#
Passed to instance.create("receipt-dropzone", options) or as props.
| Option | Type | |
|---|---|---|
transactionId | string | The FinBaze transaction to attach the receipt to. |
bankAccountId | string | With transactionExternalId: the bank account the transaction belongs to. |
transactionExternalId | string | Your id of the transaction (as delivered in the feed), with bankAccountId. |
accept | string | The file types the file dialog offers. Defaults to photos and PDFs. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
receipt.uploaded | onReceiptUploaded |
receipt.matched | onReceiptMatched |
Use it#
import { FinBazeReceiptDropzone } from "@finbaze/embed-react";
<FinBazeReceiptDropzone />
const component = instance.create("receipt-dropzone");
component.mount("#finbaze");