Attributes
The three Fluid custom elements share most of their attributes. This page is the single reference for all of them. In the table, Widget is the main <fluid-widget>, QD is <fluid-quick-deposit> and Virtual is the Sweepstakes <fluid-virtual>.
Attributes marked required are mandatory for Automatic Init on every widget: operator-id, session-id, user-id, locale, currency and country. When using Programmatic Init, they are provided to fluid.init() instead and can be omitted from the element at mount time. Keep session-id bound on the element even then, so the widget picks up session rotations; see Session handling.
| Attribute | Widget | QD | Virtual | Description |
|---|---|---|---|---|
operator-id | Required | Required | Required | Unique identifier of the host site / operator. Must correspond to the Payment Operator Config property value, provided by Fluid Payments. |
session-id | Required | Required | Required | Up-to-date session ID of the currently authenticated user. See Session handling. |
user-id | Required | Required | Required | Identifier of the currently authenticated user. |
locale | Required | Required | Required | Locale tag according to IETF BCP 47 (e.g. en-NZ or es-MX), with en (default English) and ar (default Arabic) being an exception. POSIX-style underscores are normalised automatically (en_GB is accepted as en-GB). If the value is still invalid after normalisation, the widget falls back to en and emits a fluid-error event with message invalid-init-attributes. |
currency | Required | Required | Required | Currency code according to ISO 4217. For the Sweepstakes widget this is the FIAT currency. |
country | Required | Required | Required | Country of the currently authenticated user in ISO 3166-1 Alpha-3 format. |
user-data | Optional | Optional | Optional | Details of the currently authenticated user of type FluidUserData, stringified as JSON. See Data objects. |
transaction | Optional | No | Optional | Transaction type. Widget: deposit | withdrawal | quick-deposit. Virtual: deposit (purchase) | withdrawal (redeem). |
lock-transaction-type | Optional | No | Optional | When true, the user cannot switch from the current transaction type. |
open | Optional | No | Optional | true or false; triggers the wallet to become visible or hidden. Quick Deposit is an inline element and is always visible while mounted. |
balance | Optional | No | Optional | Widget: current user balance in the given currency. Virtual: object of type VirtualBalance, stringified as JSON. See Data objects. |
withdrawable-balance | Optional | No | No | Amount available to withdraw. |
bonuses | Optional | Optional | No | Stringified bonus data. See Data objects. For Quick Deposit, providing bonus data serves a performance purpose: bonuses are processed once and become available in the main Fluid Widget. |
deposit-limit | Optional | Optional | Optional | Responsible gaming deposit limit. |
success-cta-link | Optional | No | Optional | Link for the CTA button after a successful transaction. |
z-index | Optional | Optional | Optional | Use a value high enough to display the wallet in front of other elements on the host site. |
turned-over-percentage | Optional | No | Optional | Percentage of the turned over amount. If none is provided the information will not be displayed. |
transaction-attributes | Optional | Optional | Optional | A stringified JSON object of key-value pairs that will be sent to the payment provider as transaction attributes together with the user agent and bonus code (if applicable). |
deposit-amount | Optional | Optional | Optional | The amount that will be pre-filled for the user in deposit. It takes precedence over the configured ones and should be unset for bringing back the default behaviour. |
prefilled-bonus-code | Optional | No | No | Pre-fills the manual bonus code input field. Requires the Manual Bonus Codes feature to be enabled. The code is not auto-validated; the user must click "Apply" to trigger verification via the Bridge API. |
two-factor-auth-enabled | Optional | No | No | When "true", adds a 2FA verification step to the withdrawal flow; see Two-Factor Authentication. This is a per-player flag; the host evaluates whether the player has 2FA enabled and sets it accordingly. |
overscroll-behavior-auto | Optional | No | No | When added, allows setting overscroll-behavior to auto for the inline version of the cashier. |
withdrawal-warning | Optional | No | No | A stringified JSON object that displays a custom warning message on the withdrawal input screen. See Withdrawal Warning. |
virtual-currencies | No | No | Required | Virtual currencies held by the user, object of type VirtualCurrencies, stringified as JSON. See Data objects. |
packs | No | No | Optional | Stringified packs data. See Data objects. |
Observed (reactive) attributes
The following attributes are observed by the Fluid Widget and Sweepstakes widget, and a change in their value on the host site causes a reaction within the wallet, even while it is open:
open- triggers the wallet to become visible or hiddenbalance(andwithdrawable-balance) - update balance information. On the Sweepstakes widget thebalancevalue is theVirtualBalanceobject stringified as JSON, the same shape as at initialisation;withdrawable-balancedoes not apply theresession-id- assures a consistently valid user session; see Session handlingwithdrawal-warning- updates the custom warning message displayed on the withdrawal input screen (Fluid Widget)packs- updates the packs data, including the selected pack (Sweepstakes)
Other reactive attributes are observed only while the wallet is closed:
transaction- updates the transaction typelock-transaction-type- locks the transaction type, preventing the user from switching flowsbonuses- updates bonuses information (Fluid Widget; Quick Deposit reads the attribute once at mount and does not react to later changes)deposit-limit- updates the responsible gaming deposit limit amountdeposit-amount- updates the pre-filled deposit amount; unset it to restore the default behaviouruser-data- updates user data for resolving Suggested Deposit Amounts, Payment Methods Order and KYC statussuccess-cta-link- sets the link to follow on a successful transactionturned-over-percentage- sets the turned over percentagetransaction-attributes- updates transaction attributes sent with each transaction requestprefilled-bonus-code- pre-fills the manual bonus code input field (Fluid Widget)two-factor-auth-enabled- toggles the 2FA verification step in the withdrawal flow (Fluid Widget)
Changes to the wallet-closed group made while the wallet is open are not applied immediately; they take effect the next time the wallet opens. This assures the integrity of the user's experience, so the transaction flow is not interrupted by changes on the host site. The exception is transaction: while the wallet is open the active flow is the source of truth, and the attribute is synced back to it.
The inline <fluid-quick-deposit> is always visible while mounted. It reacts to changes of deposit-limit, user-data and transaction-attributes; every other attribute, including session-id and bonuses, is read once at mount and requires a re-mount to change.