Promotional Widget

Instructions for integrating Amwal Installments user-Guideline using Amwal Promotional widget.

Add the Amwal Promotional Widget to your product, cart, or checkout page so customers can view available installment information before payment.

Prerequisites

Before you start, prepare the page where you want to display the widget:

  1. Open the HTML template for your product, cart, or checkout page.
  2. Confirm where the installment message should appear on the page.
  3. Use the transaction amount, currency, and locale that match the customer’s checkout session.

Step-by-step guide

  1. Include the Checkout script

    Add the Amwal Checkout script to the page <head> so the browser can load the <amwal-widget> web component.

    <script
      type="module"
      src="https://cdn.jsdelivr.net/npm/@amwaljs/checkout-button@latest/dist/checkout/checkout.esm.js"
    ></script>
  2. Add the widget element

    Place the widget element where you want the installment message to appear.

    <amwal-widget id="amwal-widget"></amwal-widget>
  3. Configure the widget

    Set the widget configuration after the widget element is available on the page. The configuration controls the amount, installment timeline, currency, locale, layout, and optional display elements.

    
        <script>
        
        const widgetConfig = {
            installmentsCount: 6,
            price: 18,
            currency: "SAR"
          };
    
          const widget = document.getElementById("amwal-widget");
    
          if (widget) {
            widget.config = widgetConfig;
            widget.showSocialProof = true;
            widget.showPopularBadge = true;
            widget.showMonthlyPayment = true;
            widget.showGreenBorder = true;
            widget.locale = "en";
            widget.alternateHeadline= "false"; // "true" for cars widget
            widget.tabsVariant= "classic", // "cards" for cars widget
            widget.showExtendedStep4 = true;
            widget.socialProof= "false";
            widget.popularBadge= "true";
            widget.fullInteractiveMode= "true";
            widget.showStep= "false";
            widget.widgetLayoutTheme= "mobile";
            widget.showSavings= "true";
            widget.showBenefits= "false";
            widget.showThreeMonthPlan= "false";
            widget.socialProofText = "⭐ Trusted by 50,000+ happy customers";
    
          }else{
            console.error("Amwal widget element was not found on the page.");
          }
        </script>

Optional: Complete HTML example

Use this example to test the widget on a standalone HTML page before adding it to your storefront template.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Amwal Promotional Widget</title>
    <script
      type="module"
      src="https://cdn.jsdelivr.net/npm/@amwaljs/checkout-button@latest/dist/checkout/checkout.esm.js"
    ></script>
  </head>
  <body>
    <amwal-widget id="amwal-widget"></amwal-widget>

    <script>
    
    const widgetConfig = {
        installmentsCount: 6,
        price: 18,
        currency: "SAR"
      };

      const widget = document.getElementById("amwal-widget");

      if (widget) {
        widget.config = widgetConfig;
        widget.showSocialProof = true;
        widget.showPopularBadge = true;
        widget.showMonthlyPayment = true;
        widget.showGreenBorder = true;
        widget.locale = "en";
        widget.alternateHeadline= "false"; // "true" for cars widget
        widget.tabsVariant= "classic", // "cards" for cars widget
        widget.showExtendedStep4 = true;
        widget.socialProof= "false";
        widget.popularBadge= "true";
        widget.fullInteractiveMode= "true";
        widget.showStep= "false";
        widget.widgetLayoutTheme= "mobile";
        widget.showSavings= "true";
        widget.showBenefits= "false";
        widget.showThreeMonthPlan= "false";
        widget.socialProofText = "⭐ Trusted by 50,000+ happy customers";

      }else{
        console.error("Amwal widget element was not found on the page.");
      }
    </script>
  </body>
</html>

Key options

All configuration values are passed as strings.

PropertyDescriptionAccepted values or example
priceTransaction amount shown in the widget."18"
installmentTimelineInstallment timeline shown to the customer."3", "6", "12", or "24"
currencyISO currency code shown in the widget."SAR"
localeLanguage used by the widget."en" or "ar"
widgetLayoutThemeLayout theme used by the widget."mobile" or "desktop"
showGreenBorderShows or hides the green border."true" or "false"
showMonthlyPaymentShows or hides the monthly payment amount."true" or "false"
showSavingsShows or hides savings information."true" or "false"
socialProofShows or hides social proof text."true" or "false"
socialProofTextCustom social proof message."⭐ Trusted by 50,000+ happy customers"
popularBadgeShows or hides the popular badge."true" or "false"
tabsVariantTab style used in the widget."classic" or "cards"
alternateHeadlineEnables the alternate headline."true" or "false"
showBenefitsShows or hides the benefits section."true" or "false"
showExtendedStep4Shows or hides the extended step 4 content."true" or "false"
showThreeMonthPlanShows or hides the three-month plan."true" or "false"
fullInteractiveModeEnables or disables full interactive mode."true" or "false"
showStep4Shows or hides step 4."true" or "false"

Widget placement

You can place the widget on product, cart, or checkout pages. When a customer clicks the widget, it opens a popup modal with more information about how Amwal installments work with banks and the accepted installment timeframes.

Installment Widget

Amwal installment widget displayed on a storefront page

Amwal Promotional Widget displayed on a storefront page before checkout.

Installment Modal

Default Modal

Default installment modal showing available bank installment details.

Cars Modal

Cars installment modal with the alternate headline and cards tab layout.