Klarna Web SDK v2
    Preparing search index...

    Interface IntegrationMetadata

    Interface for managing integration metadata at runtime.

    interface IntegrationMetadata {
        setIntegratorSessionReference(sessionReference: string): Promise<void>;
        setOriginators(originators: IntegrationParty[]): Promise<void>;
    }
    Index
    • Parameters

      • sessionReference: string

        The session reference to set for the integrator.

      Returns Promise<void>

      "Updates the integrator's session reference. This is primarily used by Acquiring Partners to correlate SDK activity with their own backend sessions. The session reference is sent as an HTTP header on requests to Klarna, enabling end-to-end tracing across systems.

      Call this method whenever your session identifier changes (e.g. after a page navigation or when a new checkout session is created)."

      label="Example"

      // Set the session reference to correlate SDK requests with your backend session
      await klarna.Config.IntegrationMetadata.setIntegratorSessionReference("session-abc-123");

      Config

      Config.IntegrationMetadata.setIntegratorSessionReference

      Config

      general-availability

      Config.IntegrationMetadata.setIntegratorSessionReference

      true

      true

    • Parameters

      Returns Promise<void>

      "Sets the originators information. Use this in marketplace or multi-merchant scenarios where multiple parties are involved in a transaction (e.g. a platform and its sellers). The data helps Klarna understand how the integration is built, making it easier to troubleshoot potential issues and attribute activity to the correct party."

      label="Example"

      await klarna.Config.IntegrationMetadata.setOriginators([
      {
      name: "MARKETPLACE_PLATFORM",
      moduleName: "checkout-plugin",
      moduleVersion: "2.4.1",
      sessionReference: "platform-session-xyz",
      },
      {
      name: "SELLER_STOREFRONT",
      moduleName: "storefront-sdk",
      moduleVersion: "1.0.0",
      },
      ]);

      Config

      Config.IntegrationMetadata.setOriginators

      Config

      general-availability

      Config.IntegrationMetadata.setOriginators

      true

      true