Withdrawal Warning
The withdrawal-warning attribute enables a custom notification on the withdrawal input screen. This is useful when players have active bonuses that require review or cancellation before withdrawals can proceed.
Data structure
Section titled “Data structure”type WithdrawalWarning = { title: string; // required — displays as heading message?: string; // optional body text ctaLabel?: string; // optional — renders a CTA button};Implementation
Section titled “Implementation”widget.setAttribute('withdrawal-warning', JSON.stringify({ title: 'Active Bonus', message: 'You have an active bonus. Withdrawing now will forfeit your remaining bonus balance.', ctaLabel: 'Review Bonus'}));Behaviour
Section titled “Behaviour”- The
titlefield is mandatory — omitting it silently prevents the warning from displaying - Both
messageandctaLabelare independently optional - When
ctaLabelis included, a primary button renders below the message - Clicking the button triggers a
withdrawal-warning-cta-clickedfluid-command event - The warning appears in its initial state and disappears once the user interacts with the amount input
- Invalid JSON triggers an
invalid-withdrawal-warningfluid-error event and no warning displays
Reactivity
Section titled “Reactivity”The attribute is observed reactively while the wallet is open — updates take effect immediately. When set while the wallet is closed, the warning appears on the next opening.
Availability
Section titled “Availability”This feature is available exclusively in the Fluid Cashier — not in Quick Deposit or Fluid Sweepstakes.
Handling the CTA click
Section titled “Handling the CTA click”widget.addEventListener('fluid-command', (e) => { if (e.detail.message === 'withdrawal-warning-cta-clicked') { // Navigate to bonus management, show bonus details, etc. }});