PayFanout API reference
    Preparing search index...

    Interface MountOptions

    interface MountOptions {
        appearance?: Record<string, unknown>;
        clientSecret: string;
        fieldOptions?: Record<string, unknown>;
        locale?: string;
        onChange?: (state: FieldsChangeState) => void;
        onError?: (err: UnifiedError) => void;
        onReady?: () => void;
    }
    Index
    appearance?: Record<string, unknown>

    Design-token passthrough so fields match the host app's look.

    clientSecret: string
    fieldOptions?: Record<string, unknown>

    PSP-vocabulary UI options, passed through to the SDK's field creation — untyped so every present and future SDK option stays reachable without a library release. The host wins on conflicts, except for keys the adapter must own to function (documented per adapter).

    • Stripe: Payment Element options — layout (tabs/accordion), paymentMethodOrder, fields, defaultValues, terms, wallets, …
    • Paysafe: per-field config under fields (placeholders, …), locale, …
    locale?: string

    BCP-47 locale for the PSP's own field texts, where the SDK supports one.

    onChange?: (state: FieldsChangeState) => void

    Fires as the customer types, whenever field validity changes. Adapters fire it with { complete: false } once on mount so hosts can initialize button state, then on every SDK change event.

    onError?: (err: UnifiedError) => void
    onReady?: () => void