Skip to main content

Common pitfalls

The mistakes on this page account for most of the support requests we receive during integrations. Each entry lists the symptom you will observe, the likely cause and the fix. If your integration misbehaves, scan this page first.

Session

Session handling is the most common source of first integration problems. The rules behind these fixes are explained on the Session handling page.

SymptomLikely causeFix
Wallet never becomes ready, initialisation-failure firessession-id is empty, a placeholder, or not a real session IDPass the real, current session ID of the authenticated user
Widget re-initialises constantly, or the screen flickerssession-id changes on every render, or the element is recreated on every render or route changeUse a stable value, mount and initialise once, and only change session-id on a genuine session rotation
Transactions fail after the platform session was refreshedThe new session ID was never pushed onto the widgetUpdate the session-id attribute whenever your platform rotates the session; it is observed even while the cashier is open
Widget still shows the previous user after an account switchAn identity attribute (user-id, operator-id, locale, country, currency) was changed on a live element; these are read once at mount, so the change does nothingRemove the element and mount a fresh one with the new values. See Session handling
Previous user still shown after logoutThe element was not removed at session endRemove <fluid-widget> from the DOM on logout
"Where is the session expired event?"There is no such event, refresh is automaticDo not wait for one, and handle initialisation-failure for genuine failures only
Works in the first tab, broken in a second tabThe session is per tabMake sure initialisation runs in every tab

Script loading and initialisation

SymptomLikely causeFix
The widget does not render at all, no events fireThe Fluid script never loaded (blocked by a content blocker or CSP, or the tag was never added), so the custom element is not definedCheck the network tab for the script request; verify customElements.get('fluid-widget') returns a function and window.fluid is defined
The cashier opens but shows no payment methodsThe operator configuration is incomplete, e.g. payment methods or orchestrator configuration not yet provisionedNot an embed problem; contact Fluid Payments to complete the operator setup
"Nothing happens when I call fluid.init()"fluid.init() prepares the widget but does not open the UIAfter initialised, set open="true" on the element
Wallet opens blank or errorsOpened before the initialised eventWait for initialised, then open. See the sequence in the Quick start
initialised event never observed, although the widget worksListeners attached too late, after an await, a timeout, or a late framework lifecycle hookAttach listeners in the same synchronous script block that adds the element
window.fluid.bridge is undefinedBridge handlers registered before the script finished loadingRegister handlers inside the script.onload callback. See the Window Bridge API
Widget behaves erratically or duplicates eventsMore than one Fluid element mounted, or the script loaded twiceKeep exactly one element in the DOM and guard the script injection, as shown in Framework integrations
A fluid.init() call rejects with Function call is throttled. Please wait.fluid.init() is throttled to roughly once every two seconds; a call made too soon rejects its promise with that errorCall it once per session, right after loading the script

Attributes and data

SymptomLikely causeFix
invalid-user-data, invalid-bonus-data or invalid-transaction-attributes errorsAn object was passed directly instead of stringified JSONPass object valued attributes through JSON.stringify(...). See Data objects
Widget renders in English despite another localeThe locale is not a valid IETF BCP 47 tag, so the widget fell back to enUse a valid tag such as en-GB or es-MX; an invalid-init-attributes error accompanies the fallback
fluid.init() rejects or types do not matchfluid.init() uses countryCode and currencyCode, while the HTML attributes are country and currencyUse the field names of the surface you are on. See Attributes
Wallet opens the wrong flowtransaction was never set; it defaults to depositSet transaction before opening if you want withdrawal or quick-deposit

When an error event fires, its exact meaning is listed in the Events and errors catalogue.