> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tabby.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# On‑Site Messaging

Tabby's JavaScript snippets show split-price messaging right where customers decide to buy — on your Product, Cart and Checkout pages. They raise awareness of flexible payments before checkout, which directly increases conversion. Each snippet includes a "Learn more" link that opens a pop-up with the payment schedule.

<div style={{ display: "flex", flexWrap: "wrap", gap: "1rem", justifyContent: "center", alignItems: "flex-start" }}>
  <img className="snippet-shot" alt="Product page snippet" src="https://mintcdn.com/tabby-5f40add6/3nGYTYSG6mu_ycF5/images/pdp-snippet-th.png?fit=max&auto=format&n=3nGYTYSG6mu_ycF5&q=85&s=466ce6813d3b041d8e16c3ef9369c6e7" width="200" data-path="images/pdp-snippet-th.png" />

  <img className="snippet-shot" alt="Product page snippet" src="https://mintcdn.com/tabby-5f40add6/3nGYTYSG6mu_ycF5/images/pdp-snippet-aldo.png?fit=max&auto=format&n=3nGYTYSG6mu_ycF5&q=85&s=cf9ebf4a412932ab6e5ee691da9f3a8d" width="200" data-path="images/pdp-snippet-aldo.png" />

  <img className="snippet-shot" alt="Checkout page snippet" src="https://mintcdn.com/tabby-5f40add6/3nGYTYSG6mu_ycF5/images/checkout-snippet-0626.png?fit=max&auto=format&n=3nGYTYSG6mu_ycF5&q=85&s=ec5e19233b86df466833607b342f4588" width="200" data-path="images/checkout-snippet-0626.png" />
</div>

## Add the snippets

Two components cover all pages:

* **`TabbyPromo`** — Product and Cart pages. Place the container near the product price, next to the "Add to cart" button, or below the cart total.
* **`TabbyCard`** — Checkout page, the recommended way to present Tabby payment details at checkout (see <a href="/pay-in-4-custom-integration/checkout-flow#tabby-on-checkout">Tabby on Checkout</a>). Place it under the Tabby payment method option and show it when Tabby is selected.

```html your-store-page.html expandable theme={"dark"}
<html>
  <body>
    <!-- Product / Cart page: near the price or the "Add to cart" button -->
    <div id="TabbyPromo"></div>

    <!-- Checkout page: under the Tabby payment method option -->
    <div id="TabbyCard"></div>

    <script src="https://checkout.tabby.ai/tabby-promo.js"></script>
    <script src="https://checkout.tabby.ai/tabby-card.js"></script>
    <script>
      var PUBLIC_KEY = 'pk_...';                 // required, your PUBLIC key — never expose sk_ keys
      var MERCHANT_CODE = 'your_merchant_code';  // required, based on your store currency

      // Product & Cart pages
      new TabbyPromo({
        selector: '#TabbyPromo',  // required
        currency: 'AED',          // required, 'AED' or 'SAR' or 'KWD', uppercase, no spaces
        price: '2000.00',         // required, 2 decimal places for AED, SAR; 3 for KWD.
                                  // Re-init when the price changes (e.g. variant selectors)
        lang: 'en',               // optional, 'en' or 'ar'
        source: 'product',        // optional, 'product' or 'cart'
        shouldInheritBg: false,   // optional, true to inherit your page background;
                                  // then text colors can be overridden via CSS variables
                                  // --snippetTextColor and --snippetLinkTextColor
        publicKey: PUBLIC_KEY,
        merchantCode: MERCHANT_CODE
      });

      // Checkout page
      new TabbyCard({
        selector: '#TabbyCard',
        currency: 'AED',
        price: '2000.00',
        lang: 'en',
        shouldInheritBg: false,
        publicKey: PUBLIC_KEY,
        merchantCode: MERCHANT_CODE
      });
    </script>
  </body>
</html>
```

Snippets only need your Public Key and merchant code — never expose the Secret Key in frontend code.

Make sure snippets fit mobile screen widths (320px minimum).

## Live demo

Everything below is rendered live by `tabby-promo.js` and `tabby-card.js` — exactly what your customers will see. Switch the market to preview English/AED and Arabic/SAR, and click "Learn more" to open the real pop-up.

<iframe frameBorder="0" height="780px" src="https://bnpl-demo.com/snippet-demo.html" title="Tabby On-Site Messaging live demo" width="100%" />

## Custom Promo Snippets

If you can't load Tabby's JavaScript (security policies, native mobile apps, full styling control), build your own message and open the Tabby "Learn more" pop-up via a direct URL:

| Description         | URL                                                                                                                                                                                                                                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UAE pop-up, English | [**https://checkout.tabby.ai/promos/product-page/installments/en/?price=2000.00\&currency=AED\&merchant\_code=your\_merchant\_code\&public\_key=pk\_xyz**](https://checkout.tabby.ai/promos/product-page/installments/en/?price=2000.00\&currency=AED\&merchant_code=your_merchant_code\&public_key=pk_...) |
| KSA pop-up, Arabic  | [**https://checkout.tabby.sa/promos/product-page/installments/ar/?price=2000.00\&currency=SAR\&merchant\_code=your\_merchant\_code\&public\_key=pk\_xyz**](https://checkout.tabby.sa/promos/product-page/installments/ar/?price=2000.00\&currency=SAR\&merchant_code=your_merchant_code\&public_key=pk_...) |

#### URL Parameters

| Parameter       | Required | Description           | Values                                                      |
| --------------- | -------- | --------------------- | ----------------------------------------------------------- |
| `merchant_code` | Yes      | Your merchant code    | Provided by Tabby                                           |
| `public_key`    | Yes      | Your Tabby public key | `'pk_test_...'`, `'pk_...'`                                 |
| `price`         | Yes      | Product or cart price | `'1200.00'`, `'99.99'`, `'5.500'` (3 decimals for KWD only) |
| `currency`      | Yes      | Currency code         | `AED`, `SAR`, `KWD`                                         |
| `lang`          | No       | Language code         | `en`, `ar`                                                  |

<Note>
  If you implement your own custom snippet, notify your Tabby account manager so we can keep your integration in sync with upcoming changes.
</Note>

<div style={{ display: "flex", flexWrap: "wrap", gap: "1rem", justifyContent: "center", alignItems: "flex-start" }}>
  <img className="product-shot" alt="UAE pop-up with price, en" src="https://mintcdn.com/tabby-5f40add6/P693KbtvGHftcJLw/images/custom-uae-en-0625.JPG?fit=max&auto=format&n=P693KbtvGHftcJLw&q=85&s=4705d8f2eacfe6bd9b9a996302fb3d8e" width="200" data-path="images/custom-uae-en-0625.JPG" />

  <img className="product-shot" alt="KSA pop-up with price, en" src="https://mintcdn.com/tabby-5f40add6/iK1YsG45ORNrhJBb/images/custom-ksa-en-0626.png?fit=max&auto=format&n=iK1YsG45ORNrhJBb&q=85&s=73803f1c4e0404d45b45838e74bddb9c" width="200" data-path="images/custom-ksa-en-0626.png" />
</div>

For promo messaging inside native mobile apps, see <a href="/pay-in-4-custom-integration/mobile-apps/app-promo-messaging">App Promo Messaging</a>.
