Fluid Quick Deposit
The Fluid Quick Deposit (<fluid-quick-deposit>) provides a simplified, one-click deposit experience using recently stored payment methods. It is designed for desktop gameplay and integrates inline within your page (not as a modal), respecting its parent element’s styles.
When to use Quick Deposit
Section titled “When to use Quick Deposit”Use Quick Deposit when you want to:
- Offer a fast deposit option during gameplay
- Let users deposit with a previously used payment method without opening the full cashier
- Embed a compact deposit UI inline within your game or lobby
Loading the script
Section titled “Loading the script”<script src="https://get.fluidpayments.io/index.js"></script>Mounting the widget
Section titled “Mounting the widget”<fluid-quick-deposit operator-id="your-operator-id" session-id="user-session-id" user-id="user-id" locale="en" currency="EUR" country="MLT"></fluid-quick-deposit>Initialisation
Section titled “Initialisation”Quick Deposit follows the same initialisation pattern as the main widget. Initialising one component automatically prepares the other for use, for improved performance, and programmatic initialisation with fluid.init() can be used to initialise both. See Session Handling for the session lifecycle rules.
const quickDeposit = document.createElement('fluid-quick-deposit');
// Set required attributesquickDeposit.setAttribute('operator-id', 'your-operator-id');quickDeposit.setAttribute('session-id', 'user-session-id');quickDeposit.setAttribute('user-id', 'user-id');quickDeposit.setAttribute('locale', 'en');quickDeposit.setAttribute('currency', 'EUR');quickDeposit.setAttribute('country', 'MLT');
// Attach listenersquickDeposit.addEventListener('fluid-info', handleInfo);quickDeposit.addEventListener('fluid-error', handleError);quickDeposit.addEventListener('fluid-command', handleCommand);
// Mountdocument.getElementById('quick-deposit-container').appendChild(quickDeposit);Supported attributes
Section titled “Supported attributes”Quick Deposit is simpler than the Fluid Cashier and accepts only the following attributes. See the Attributes reference for details.
| Attribute | Notes |
|---|---|
operator-id |
Required, unless you use programmatic initialisation |
session-id |
Required. Keep it on the element under programmatic initialisation too, so the widget picks up session rotations |
user-id |
Required, unless you use programmatic initialisation |
locale |
Required, unless you use programmatic initialisation |
currency |
Required, unless you use programmatic initialisation |
country |
Required, unless you use programmatic initialisation |
z-index |
Optional |
bonuses |
Optional — see the note below |
transaction-limits |
Optional |
user-data |
Optional |
transaction-attributes |
Optional |
deposit-amount |
Optional |
allow-decimal-amounts |
Optional |
The bonus data and user data shapes are documented on the Data Objects page.
Full example
Section titled “Full example”<script src="https://get.fluidpayments.io/index.js"></script><fluid-quick-deposit operator-id="<your operator ID>" session-id="<authenticated user session ID>" user-id="<authenticated user ID>" user-data="<authenticated user details>" locale="<locale tag>" country="<authenticated user country>" currency="<user currency code>" bonuses="<bonus data>" transaction-limits="<transaction limit data>" z-index="<z-index value>" transaction-attributes="<stringified JSON object of key-value pairs for the payment provider>" deposit-amount="<pre-filled deposit amount>"></fluid-quick-deposit>Visibility
Section titled “Visibility”Quick Deposit has no open attribute: it is visible as soon as it is mounted.
Event handling
Section titled “Event handling”Quick Deposit emits the same event types as the main widget:
fluid-info— informational events includinginitialisedfluid-error— error eventsfluid-command— required actions
In addition, Quick Deposit emits deposit-cta-clicked (a fluid-info event) when the user has no stored payment method it can use and clicks its Deposit button. Respond by opening the Fluid Cashier for a regular deposit. The full catalogue lives on the Events & Errors page.
Cleanup
Section titled “Cleanup”quickDeposit.remove();Differences from the full widget
Section titled “Differences from the full widget”| Feature | Fluid Cashier | Quick Deposit |
|---|---|---|
| Deposits | Yes | Yes |
| Withdrawals | Yes | No |
| Payment method management | Yes | No |
| Display mode | Modal overlay | Inline |
| Payment methods shown | All configured | One recently stored method |