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.
PaymentWithdrawals2 is a specialized widget that displays available withdrawal payment methods for a casino or betting brand in a clean, responsive logo grid format. It features intelligent collapse/expand functionality that adapts to container width, making it perfect for showcasing withdrawal options on review pages, banking sections, and withdrawal information displays.
Key Features:
headingtext attribute| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id |
string | Yes | - | Must be “paymentwithdrawals2” |
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 withdrawal 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 attributewithdrawalLabel)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="paymentwithdrawals2"
cloakedlink="leovegas-casino"
language="en"
country="UK"
items="15"
headingtext="Available Withdrawal Methods" \>
</nw-blocks>
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="betsson-casino"
language="en"
country="SE"
items="12"
headingtext="Cash Out Options" \>
</nw-blocks>
<!-- English -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="fresh-casino"
language="en"
country="UK"
headingtext="Withdrawal Options" \>
</nw-blocks>
<!-- French -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="cresus-casino"
language="fr"
country="FR"
headingtext="Méthodes de Retrait" \>
</nw-blocks>
<!-- Spanish -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="fresh-casino"
language="es"
country="ES"
headingtext="Opciones de Retiro" \>
</nw-blocks>
<!-- German -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="betway-casino"
language="de"
country="DE"
headingtext="Auszahlungsmethoden" \>
</nw-blocks>
<!-- Portuguese -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="betano-casino"
language="pt"
country="BR"
headingtext="Métodos de Saque" \>
</nw-blocks>
<!-- New Jersey -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="draftkings-casino"
language="en"
country="US"
headingtext="NJ Approved Withdrawal Methods" \>
</nw-blocks>
<!-- Pennsylvania -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="fanduel-casino"
language="en"
country="US-PA"
headingtext="PA Withdrawal Options" \>
</nw-blocks>
<!-- Michigan -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="betmgm-casino"
language="en"
country="US-MI"
headingtext="Michigan Withdrawal Methods" \>
</nw-blocks>
<!-- Ontario, Canada -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="betano-sports"
language="en"
country="CA-ON"
headingtext="Ontario Cashout Options" \>
</nw-blocks>
<!-- Show top 5 withdrawal methods -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="casino-brand"
language="en"
country="CA"
items="5"
headingtext="Popular Withdrawal Methods" \>
</nw-blocks>
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="mobile-casino"
language="en"
country="UK"
items="8"
headingtext="Mobile Withdrawals" \>
</nw-blocks>
<!-- No items limit - show all available withdrawal methods -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="greatwin-casino"
language="en"
country="ZZ"
headingtext="All Withdrawal Methods" \>
</nw-blocks>
<!-- Deposits section -->
<nw-blocks
id="paymentdeposits2"
cloakedlink="casino-brand"
language="en"
country="UK"
items="10"
headingtext="Deposit Methods" \>
</nw-blocks>
<!-- Withdrawals section -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="casino-brand"
language="en"
country="UK"
items="10"
headingtext="Withdrawal Methods" \>
</nw-blocks>
items based on page context (5-10 for highlights, 15+ for comprehensive)Control withdrawal method order via CMS configuration:
// Withdrawal method order defined in Sanity CMS
withdrawalMethods: [
{ paymentMethod: "skrill", image: "/skrill.png" },
{ paymentMethod: "neteller", image: "/neteller.png" },
{ paymentMethod: "bank-transfer", image: "/bank.png" },
// ... more methods
]
Widget adapts to parent container:
<!-- Full width section -->
<div style="width: 100%; max-width: 1200px;">
<nw-blocks id="paymentwithdrawals2" ...></nw-blocks>
</div>
<!-- Sidebar (narrow) -->
<div style="width: 300px;">
<nw-blocks id="paymentwithdrawals2" ...></nw-blocks>
</div>
<!-- Two-column layout -->
<div style="width: 50%; min-width: 400px;">
<nw-blocks id="paymentwithdrawals2" ...></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 withdrawal methods from brand profile:
{
brand: {
cloakedLink: "greatwin-casino",
brandName: "GreatWin Casino",
isBrandActive: true,
withdrawalMethods: [
{
paymentMethod: "skrill",
image: "https://cdn.example.com/payment-methods/skrill.png",
displayName: "Skrill",
processingTime: "Instant",
minWithdrawal: "10",
maxWithdrawal: "10000",
withdrawalFee: "0"
},
{
paymentMethod: "neteller",
image: "https://cdn.example.com/payment-methods/neteller.png",
displayName: "Neteller",
processingTime: "Instant",
minWithdrawal: "10",
maxWithdrawal: "10000",
withdrawalFee: "0"
},
{
paymentMethod: "bank-transfer",
image: "https://cdn.example.com/payment-methods/bank.png",
displayName: "Bank Transfer",
processingTime: "3-5 business days",
minWithdrawal: "50",
maxWithdrawal: "50000",
withdrawalFee: "0"
},
{
paymentMethod: "visa",
image: "https://cdn.example.com/payment-methods/visa.png",
displayName: "Visa",
processingTime: "1-3 business days",
minWithdrawal: "10",
maxWithdrawal: "5000",
withdrawalFee: "0"
},
// ... more methods
],
withdrawalLabel: "Withdrawal Methods",
showLessLabel: "Show Less",
viewMoreLabel: "View more"
}
}
Required Fields:
cloakedLink: Brand identifierisBrandActive: Brand statuswithdrawalMethods: Array of withdrawal methodsWithdrawal Method Fields:
paymentMethod: Method identifier (required)image: Logo URL (required)displayName: Human-readable nameprocessingTime: Time to process withdrawalminWithdrawal: Minimum withdrawal amountmaxWithdrawal: Maximum withdrawal amountwithdrawalFee: Fee amount or “0” for freeOptional Fields:
withdrawalLabel: Default heading textshowLessLabel: Collapse button labelviewMoreLabel: Expand button labelRequired i18n keys:
{
"wgt-paymentMethods-withdrawals": "Withdrawal Methods",
"wgt-payment-show-less": "Show Less",
"wgt-payment-view-more": "View more",
"wgt-paymentMethods-method": "Method",
"wgt-paymentMethods-delay": "Processing Time",
"wgt-paymentMethods-withdrawal": "Min/Max Withdrawal"
}
Language-Specific Examples:
{
"en": {
"wgt-paymentMethods-withdrawals": "Withdrawal Methods",
"wgt-payment-show-less": "Show Less",
"wgt-payment-view-more": "View more"
},
"fr": {
"wgt-paymentMethods-withdrawals": "Méthodes de Retrait",
"wgt-payment-show-less": "Afficher moins",
"wgt-payment-view-more": "Voir plus"
},
"es": {
"wgt-paymentMethods-withdrawals": "Métodos de Retiro",
"wgt-payment-show-less": "Mostrar menos",
"wgt-payment-view-more": "Ver más"
},
"de": {
"wgt-paymentMethods-withdrawals": "Auszahlungsmethoden",
"wgt-payment-show-less": "Weniger anzeigen",
"wgt-payment-view-more": "Mehr anzeigen"
},
"pt": {
"wgt-paymentMethods-withdrawals": "Métodos de Saque",
"wgt-payment-show-less": "Mostrar menos",
"wgt-payment-view-more": "Ver mais"
}
}
Withdrawal method data is cached:
PAYMENT_WITHDRAWALS:{cloakedLink}:{country}:{language}If brand is inactive:
<p id="inactive-brand" style="visibility: hidden;">
The brand with name {brandName} is currently inactive or not allowed in this country!
</p>
Handling:
isBrandActive flagIf no withdrawal methods available:
If withdrawal method logo missing:
If JavaScript disabled:
| Feature | PaymentDeposits2 | PaymentWithdrawals2 | PaymentMethods2 |
|---|---|---|---|
| Methods Shown | Deposits only | Withdrawals only | Both combined |
| Display Type | Logo grid | Logo grid | Logo grid |
| Product Filter | ❌ No | ❌ No | ✅ Yes |
| Items Limit | ✅ Yes | ✅ Yes | ✅ Yes |
| Custom Heading | ✅ Yes | ✅ Yes | ❌ No |
| Toggle Type | Smart per-row | Smart per-row | Smart per-row |
| Responsive | ✅ Dynamic grid | ✅ Dynamic grid | ✅ Dynamic grid |
| Use Case | Deposit info | Withdrawal info | All payment info |
When to use PaymentWithdrawals2:
When to use PaymentDeposits2:
When to use PaymentMethods2:
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="paymentwithdrawals2"
cloakedlink="greatwin-casino"
language="en"
country="CM"
items="11"
headingtext="Available Withdrawal Methods" \>
</bw-widget>
<!-- New syntax (recommended) -->
<nw-blocks
id="paymentwithdrawals2"
cloakedlink="greatwin-casino"
language="en"
country="CM"
items="11"
headingtext="Available Withdrawal Methods" \>
</nw-blocks>
Both tags work identically, but <nw-blocks> is recommended for all new implementations.