dolfindevelopers

Confirm bank details dialog

DialogPayablesSDK + UI

Confirm a supplier's bank account for pay-by-bank. Shows the account and echoes exactly those details back, so a confirmation is refused if the account changed in the meantime.

Dialog: a modal you open from your own screen. You control when it opens with its props. Pages vs components

Choose your integration

Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.

Loading preview…

Installation

Needs the Dolfin registry token. The CLI copies the source into your app.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/ap-confirm-bank-details-dialog

Also installs: button, dialog, base-theme, ap-supplier-details, ui-ap-confirm-bank-details-dialog.

Usage

screen.tsx
import { ApConfirmBankDetailsDialog } from "@/components/dolfin/ap/confirm-bank-details-dialog";

// Place it anywhere inside your <DolfinProvider>.
<ApConfirmBankDetailsDialog supplier={supplier} open={open} onOpenChange={handleOpenChange} />

Renders inside DolfinProvider (set it up once). By default it loads its own data through the SDK. Supplied-data examples show how to override that behavior.

API reference

PropTypeDescription
supplier required{ id?: string; organisationId?: string; name: string; email?: null | string; phone?: null | string; website?: null | string; taxNumber?: nul…
open requiredboolean
onOpenChange required(open: boolean) => void
onConfirmed(supplier: Supplier) => voidAfter the confirmation was saved; the dialog has closed.
onConfirm(bankDetails: NonNullable<Supplier["bankDetails"]> | null) => void | Promise<unknown>Confirms the account yourself, with the details exactly as the dialog showed them. Resolve to close the dialog; reject (or set `error`) to keep it open.
submittingboolean
errorErrorWhy the confirmation failed (a `DolfinError` reads as the API's message).
stalebooleanThe account changed since the dialog opened: confirming is refused.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.supplierscore.errors

Or edit the installed file directly: it is your code. See theming for colours and fonts.

Hooks

The SDK hooks this dialog uses. Use them directly from @dolfinai/react to build your own version.

useMessagesuseSupplierMutations

Files

Written to your app by the install command:

  • components/dolfin/ap/confirm-bank-details-dialog.tsx 140 lines