Klarna Web SDK v2
    Preparing search index...

    Interface KlarnaPlacement

    gated

    interface KlarnaPlacement {
        htmlElement: HTMLElement;
        id?: string;
        mount(containerSelector: string | HTMLElement): this;
        unmount(): this;
        update(options: KlarnaPlacementUpdateOptions): Promise<void>;
    }

    Hierarchy (View Summary)

    Index
    htmlElement: HTMLElement
    id?: string
    • Parameters

      • containerSelector: string | HTMLElement

      Returns this

    • Update a mounted placement with new options.

      Parameters

      • options: KlarnaPlacementUpdateOptions

        Options to update.

        Options that can be changed on a placement after it has been created.

        • Optionalamount?: number

          The value should be in non-negative minor units. Eg: 25 Dollars should be 2500.

        • OptionalenablementCodes?: string[]

          Enablement codes that apply to this purchase. When a payment program requires an enablement code, Klarna includes that program in the messaging content only if you provide the code. Up to 20 codes. Replaces the codes set for the SDK instance; an empty array means no codes are sent.

          future-release

        • Optionallocale?: string

          Preferred locale, in IETF BCP 47 format.

        • Optionaltheme?: "default" | "light" | "dark" | "outlined"

          Specifies the theme for the messaging content. This parameter allows customization of the message appearance to match the Partner's site theme.

      Returns Promise<void>

      placement.update({ amount: 3000, theme: "dark" });