salla-installment

Shows the "pay in installments" promo widgets of the installment providers the store has enabled (Tamara, Tabby, Spotii, Mispay, Emkan, Madfu, Mokafaa Alrajhi points and Klarna) for a given price.

Shows the "pay in installments" promo widgets of the installment providers the store has enabled (Tamara, Tabby, Spotii, Mispay, Emkan, Madfu, Mokafaa Alrajhi points and Klarna) for a given price. Use it on the product page under the price. The set of providers comes from the store settings, and each provider's widget script is loaded by the component.

Nothing is rendered unless price is a plain positive number string such as "199" or "199.50" (up to 3 decimals, no thousands separators or currency symbol). When another component emits product::price.updated with a new data.price, the widgets refresh with that price. Emkan, Madfu, Mokafaa Alrajhi and Mispay only appear when the currency is SAR.

Use it

In HTML or JSX, use the tag <salla-installment> with the Attribute names below. In React, the wrapper takes the Property names (camelCase).

import { SallaInstallment } from '@salla.sa/twilight-components-react/installment';

Client-only. On the server this wrapper renders a placeholder (a skeleton, or nothing), and the real component mounts in the browser. Do not rely on it for content that search engines must see.

Example

import { SallaInstallment } from '@salla.sa/twilight-components-react/installment';

export function Example() {
  return (
    <SallaInstallment price="199.50" />
  );
}

Properties

PropertyAttributeDescriptionTypeDefault
countrycountryCountry code. On load it is replaced by the customer's country, falling back to SA. It is not read anywhere else in this component.stringsalla.config.get('user.country_code')
currencycurrencyISO currency code (for example SAR). On load it is replaced by the customer's current currency, falling back to SAR.stringsalla.config.get('user.currency_code')
languagelanguageLanguage code used by the provider widgets (for example ar or en). On load it is replaced by the store's current language, falling back to ar.stringsalla.config.get('user.language_code')
pricepriceThe amount to show installments for, as a plain number string with up to 3 decimals (for example "199.50"). Must be greater than zero, otherwise nothing is rendered.string

On this page