Migration Notice: We are transitioning from <bw-widget> to <nw-blocks> tags. While both are currently supported for backward compatibility, <nw-blocks> is now the recommended tag for all new implementations. Existing <bw-widget> implementations will continue to function.
PaymentDeposits2 is a modern, responsive widget that displays available deposit payment methods for a casino or betting brand. It features an intelligent collapse/expand system that adapts to container width, showing only the methods that fit and allowing users to toggle to see all options. Perfect for payment information sections, review pages, and deposit method showcases.
Key Features:
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | Yes | - | Must be “paymentdeposits2” |
cloakedlink |
string | Yes | - | Brand identifier/cloaked link |
language |
string | No | “en” | ISO 639-1 language code |
country |
string | No | "" | ISO 3166-1 country code (supports state: US-NJ, CA-ON) |
countrystate |
string | No | - | State/province code (auto-parsed from country) |
items |
number | No | - | Maximum number of payment methods to display |
itemsdisplayed |
number | No | - | Alternative attribute name for items limit |
headingtext |
string | No | - | Custom heading text (overrides default label) |
labeloverridetext |
string | No | - | Alternative attribute name for custom heading |
headers |
array | No | […] | Header translation keys (not used in this widget) |
order |
string | No | "" | Custom ordering for payment methods |
Display:
headingtext attributepaymentLabel)Styling:
Layout:
Logos:
Functionality:
States:
Labels:
The widget calculates optimal columns using:
function calculatePerRow() {
const style = window.getComputedStyle(widget);
const padding = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
const availableWidth = widget.clientWidth - padding;
const logoWidth = 87;
const gap = 20;
const columns = Math.floor((availableWidth + gap) / (logoWidth + gap));
// Special breakpoints
if (availableWidth <= 290) return 4;
if (availableWidth <= 308) return 6;
if (availableWidth <= 350) return 3;
return columns;
}
Real-time Updates:
Events Handled:
| Width Range | Columns | Behavior |
|---|---|---|
| ≤290px | 4 | Mobile narrow |
| 291-308px | 6 | Mobile standard |
| 309-350px | 3 | Mobile wide |
| >350px | Dynamic | Desktop (calculated) |
The widget injects a self-executing script that:
Event Handling:
State Management:
Cleanup:
<nw-blocks
id="paymentdeposits2"
cloakedlink="leovegas-casino"
language="en"
country="UK"
items="15"
headingtext="Available Deposit Methods">
</nw-blocks>
<!-- English -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="betsson-casino"
language="en"
country="SE"
headingtext="Deposit Options">
</nw-blocks>
<!-- French -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="cresus-casino"
language="fr"
country="FR"
headingtext="Méthodes de Dépôt">
</nw-blocks>
<!-- Spanish -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="22bet-sport"
language="es"
country="ES"
headingtext="Opciones de Depósito">
</nw-blocks>
<!-- German -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="betway-casino"
language="de"
country="DE"
headingtext="Einzahlungsmethoden">
</nw-blocks>
<!-- New Jersey -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="draftkings-casino"
language="en"
country="US"
headingtext="NJ Approved Deposit Methods">
</nw-blocks>
<!-- Pennsylvania -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="fanduel-casino"
language="en"
country="US-PA"
headingtext="PA Deposit Options">
</nw-blocks>
<!-- Michigan -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="betmgm-casino"
language="en"
country="US-MI"
headingtext="Michigan Payment Methods">
</nw-blocks>
<!-- Show top 5 methods -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="casino-brand"
language="en"
country="CA"
items="5"
headingtext="Popular Deposit Methods">
</nw-blocks>
<nw-blocks
id="paymentdeposits2"
cloakedlink="mobile-casino"
language="en"
country="UK"
items="8"
headingtext="Mobile Deposits">
</nw-blocks>
<!-- No items limit - show all available methods -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="greatwin-casino"
language="en"
country="ZZ"
headingtext="All Deposit Methods">
</nw-blocks>
items based on page context (5-10 for highlights, 15+ for comprehensive)Control payment method order via CMS configuration:
// Payment method order defined in Sanity CMS
depositMethodsOrder: [
{ paymentMethod: "visa", image: "/visa.png" },
{ paymentMethod: "mastercard", image: "/mc.png" },
{ paymentMethod: "skrill", image: "/skrill.png" },
// ... more methods
]
Widget adapts to parent container:
<!-- Full width section -->
<div style="width: 100%; max-width: 1200px;">
<nw-blocks id="paymentdeposits2" ...></nw-blocks>
</div>
<!-- Sidebar (narrow) -->
<div style="width: 300px;">
<nw-blocks id="paymentdeposits2" ...></nw-blocks>
</div>
Default labels can be overridden via CMS:
{
showLessLabel: "Show Less",
viewMoreLabel: "View more"
}
<!-- Top methods only -->
<nw-blocks items="6" ...></nw-blocks>
<!-- Standard display -->
<nw-blocks items="12" ...></nw-blocks>
<!-- Comprehensive list -->
<nw-blocks items="20" ...></nw-blocks>
<!-- All available (no limit) -->
<nw-blocks ...></nw-blocks>
Widget fetches deposit methods from brand profile:
{
brand: {
cloakedLink: "greatwin-casino",
brandName: "GreatWin Casino",
isActive: true,
isBrandActive: true,
depositMethodsOrder: [
{
paymentMethod: "visa",
image: "https://cdn.example.com/payment-methods/visa.png",
displayName: "Visa",
processingTime: "Instant",
minDeposit: "10",
maxDeposit: "5000"
},
{
paymentMethod: "mastercard",
image: "https://cdn.example.com/payment-methods/mastercard.png",
displayName: "Mastercard",
processingTime: "Instant",
minDeposit: "10",
maxDeposit: "5000"
},
{
paymentMethod: "skrill",
image: "https://cdn.example.com/payment-methods/skrill.png",
displayName: "Skrill",
processingTime: "Instant",
minDeposit: "10",
maxDeposit: "10000"
},
// ... more methods
],
withdrawalMethods: [
// Withdrawal methods (combined with deposit methods)
],
paymentLabel: "Deposit Methods",
showLessLabel: "Show Less",
viewMoreLabel: "View more"
}
}
Required Fields:
cloakedLink: Brand identifierisActive: Brand statusdepositMethodsOrder: Array of deposit methodsPayment Method Fields:
paymentMethod: Method identifierimage: Logo URL (required)displayName: Human-readable nameprocessingTime: Time to process depositminDeposit: Minimum deposit amountmaxDeposit: Maximum deposit amountOptional Fields:
withdrawalMethods: Combined with deposit methodspaymentLabel: Default heading textshowLessLabel: Collapse button labelviewMoreLabel: Expand button labelRequired i18n keys:
{
"wgt-paymentMethods-deposits": "Deposit Methods",
"wgt-payment-show-less": "Show Less",
"wgt-payment-view-more": "View more",
"wgt-paymentMethods-method": "Method",
"wgt-paymentMethods-delay": "Processing Time",
"wgt-paymentMethods-deposit": "Min/Max Deposit",
"wgt-paymentMethods-withdrawal": "Min/Max Withdrawal"
}
Payment method data is cached:
PAYMENT_DEPOSITS:{cloakedLink}:{country}:{language}If brand is inactive:
<p id="inactive-brand" style="display: none;">
The brand {brandName} is inactive or not allowed.
</p>
Handling:
isActive and isBrandActive flagsIf no deposit methods available:
If payment method logo missing:
If JavaScript disabled:
| Feature | PaymentDeposits2 | PaymentMethods |
|---|---|---|
| Display Type | Logo grid only | Full table with details |
| Information | Visual logos | Method, time, limits |
| Collapse/Expand | ✅ Smart toggle | ✅ Show more button |
| Responsive | ✅ Dynamic columns | ✅ Horizontal scroll |
| Items Limit | ✅ Yes | ✅ Yes |
| Use Case | Quick visual reference | Detailed comparison |
| Mobile | ✅ Optimized | ⚠️ Scroll required |
When to use PaymentDeposits2:
When to use PaymentMethods:
All examples above use the new <nw-blocks> tag. For backward compatibility, you can still use <bw-widget>:
<!-- Old syntax (still supported) -->
<bw-widget
id="paymentdeposits2"
cloakedlink="greatwin-casino"
language="en"
country="CM"
items="11"
headingtext="Available Deposit Methods">
</bw-widget>
<!-- New syntax (recommended) -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="greatwin-casino"
language="en"
country="CM"
items="11"
headingtext="Available Deposit Methods">
</nw-blocks>
Both tags work identically, but <nw-blocks> is recommended for all new implementations.