Klarna Docs - Operations and maintenance

Basket

Parameter nameAttribute IDDescription
Klarna Session IDkpSessionIdThe Klarna session ID returned after “Create Session” API  endpoint is called(Applicable from version 21.2.0)
Klarna Client TokenkpClientTokenClient token returned by “Create Session” API endpoint and  used to  initialize the JS SDK(Applicable from version 21.2.0)
Klarna Client Token FrequencykpSubscriptionFrequencySubscription frequency values (day, month, etc.)
Klarna Subscription PeriodkpSubscriptionPeriodPredefined subscription period in numbers
Klarna Is Express CheckoutkpIsExpressCheckoutDetermines if the basket is an express checkout
Klarna Session IDkpSessionIdThe Klarna session ID returned after “Create Session” API  endpoint is called(Applicable from version 21.2.0)

Order

Parameter nameAttribtute IDDescription
Klarna Payments Order IDkpOrderIDThe Klarna Payments Order ID for Klarna payment method selected by customer
VCN BrandkpVCNBrandKlarna Payments virtual card scheme name
VCN HolderkpVCNHolderKlarna Payments virtual card holder name
VCN Card IDkpVCNCardIDKlarna Payments Virtual Card - Card ID
VCN PCI DatakpVCNPCIDataKlarna Payments Virtual Card PCI Data in encrypted format
VCN Initialization VectorkpVCNIVKlarna Payments Virtual Card Initialization Vector
VCN AES KeykpVCNAESKeyKlarna Payments Virtual Card AES Key
Is VCN UsedkpIsVCNTrue if virtual card is enabled & used for payment of the order, otherwise false
Klarna Session IDkpSessionIdThe Klarna session ID returned after “Create Session” API endpoint is called(Applicable from version 21.2.0)
Klarna Client TokenkpClientTokenClient token returned by “Create Session” API endpoint and used to  initialize the JS SDK(Applicable from version 21.2.0)
Klarna Subscription FrequencykpSubscriptionFrequencySubscription frequency values (day, month, etc.)
Klarna Subscription PeriodkpSubscriptionPeriodPredefined subscription period in numbers

Order Payment Instrument

Parameter nameAttribute IDDescription
Klarna Payment Category IDklarnaPaymentCategoryIDID of Klarna payment category
Klarna Payment Category NameklarnaPaymentCategoryNameName of Klarna payment category

Payment Transaction

Parameter nameAttribute IDDescription
Fraud StatuskpFraudStatusKlarna Payments order fraud status
Klarna Authorization TokenkpAuthorizationTokenThis attribute stores the Klarna authorization token, which is a string value used to authenticate and finalize the order creation process with Klarna's payment system.

(Applicable from version 23.2.0)
Klarna Redirect URLkpRedirectURLThis attribute holds the URL to which the customer is redirected after the payment authorization is successfully completed by Klarna's system.

(Applicable from version 23.2.0)

Site preferences

Klarna Payments (Klarna_KP)
Parameter nameAttribute IDDescription
Enable Klarna Paymentskp_enableEnable/Disable Klarna Payments.Boolean attribute with Default value as true
Color CustomizationkpColorCustomizationJSON attribute to customize color
Enable Extra Merchant DatakpEMDEnable this option to include customer_account_info and other_delivery_address as attachments when creating an order. Boolean with default value false.
VCN - Enable settlement retrykpVCNRetryWhen set to “Yes”, SFCC will automatically retry the VCN settlement in the event of a service error. Boolean with default value false
Log Extra debug datakpLogExtraDataAttribute to log debug data.Boolean with default value true
Merchant Reference 2merchant_reference2Enter the attribute from the SCC order (basket) object that you would like to forward as an additional merchant reference to Klarna. This attribute must be a class attribute of the SCC LineItemCtnr. String attribute
Agent username for subscriptionskpSubsUsername
Agent password for subscriptionskpSubsPasswordAgent password to login on behalf of customers to create subscription orders. Password Attribute
Enable retry for subscriptionskpSubsRetryEnableBoolean with default value false
Number of RetrieskpSubsRetryNumberNumber attribute
Recurring retry frequencykpSubsRetryFrequencyNumber attribute
Klarna Express checkout (Klarna_KEC)
Parameter nameAttribute IDDescription
Enable Express Checkoutkec_enableBoolean flag to enable/disable Klarna Express checkout
Themekec_themeThe theme of the button. Options include default, light & dark
Button Shapekec_shapeThe shape of the button. Options include default, rect & pill
Placementkec_placementMulti-select attribute to choose where to display express checkout buttons. Values: cart, PDP, mini cart
Klarna On-site messaging
Parameter nameAttribute IDDescription
Enable On-Site Messagingosm_enableEnable/Disable OSM functionality
Themeosm_themeTheme for on site messaging .Options include default,dark and custom
Placementosm_placementMulti-select dropdown which includes cart, pdp, header, footer and info. Placement Tag IDs are hardcoded in code.
Custom stylingosm_custom_stylingJSON to store custom styling
Sign in with Klarna (SIWK)
Parameter nameAttribute IDDescription
Enable Sign-in with Klarnasiwk_enableBoolean flag to enable/disable Klarna SIWK
Scopesiwk_scopeMulti Selection list of available scopes that can be requested
Redirect URLsiwk_redirect_urlLogin redirect url
Button themesiwk_themeThe theme of the button. Options include default, light & dark
Button Shapesiwk_shapeThe shape of the button. Options include default, rect & pill
Logo alignmentsiwk_alignmentKlarna logo alignment. Options include badge, left & center
Placementsiwk_placementMultiselect attribute to choose where to display SIWK buttons. Values: login and checkout

Product parameters for Klarna subscriptions

Parameter nameAttribute IDDescription
Is Klarna Standard ProductkpIsStandardProductBoolean attribute to define if the product is standard.
Is Klarna Subscription ProductkpIsSubscriptionProductBoolean attribute to define if the product is eligible for subscription.
Klarna Trial Days UsagekpTrialDaysUsageNumeric value used for free trial definition.

ProductLineItem

Parameter nameAttribute IDDescription
Is Selected for Subscription productkpSubscriptionBoolean attribute to define if the product is selected for subscription in the basket.
Enriched data for product line item.klarna_oms_lineItemJSONString data for product line item.

Profile

Parameter nameAttribute IDDescription
Klarna SubscriptionskpSubscriptionsText attribute to store customer subscriptions to Klarna

Klarna activation

KlarnaActivation custom object gives an opportunity to configure multiple MIDs per site. Merchants could have different credentials, clientIDs and VCN keys per country or group of countries. It has a similar structure to the Klarna Activation Site preferences group. Klarna Activation Key is the unique key for each Klarna Activation CO entry. It should be defined by the merchant and could have any unique string value.

Klarna activation attributes

Klarna activation attributes

Parameter nameAttribute IDDescription
Klarna Activation Keykp_activation_keyUnique identifier for a single KlarnaActivation entry. It is a free text entered by the merchant.
Regionkp_region_countriesKlarna regions (Europe, North America, Oceania)
Market(s)kp_market_countriesKlarna available countries
Client IDkp_client_id_countriesClient ID generated in Klarna Merchant Portal
API UsernameKP_API_Username_countriesAPI username generated in Klarna Merchant Portal
API PasswordKP_API_Password_countriesAPI password generated in Klarna Merchant Portal
Enable Virtual Card Number (VCN)kpVCNEnabled_countriesFlag to enable virtual card number for selected countries. This will override the globally selected in Klarna Payments.
Public Key IDkpVCNkeyId_countriesCountries specific public key for VCN
Enable settlement retrykpVCNRetry_countriesFlag to enable settlement retry for selected countries. This will override the globally selected in Klarna Payments.

The following session custom attributes are saved in session.privacy storage and accessible in checkout. The attributes are retained for the session lifetime & cleared when the customer logs out of their profile.

AttributeDescription
KlarnaLocaleThe Klarna locale in use
KlarnaPaymentsSessionID
(Not included as session attributes from version 21.2.0)
The Klarna session ID returned after “Create Session” API endpoint is called
KlarnaPaymentsClientToken
(Not included as session attribute from version 21.2.0)
Client token returned by “Create Session” API endpoint and used to  initialize the JS SDK
KlarnaPaymentMethodsThe available payment method categories for the respective Klarna session; Saved in JSON format
KlarnaPaymentsAuthorizationTokenThe authorization token returned by JS SDK “Authorize” call
KPAuthInfoWhether finalization is required for the payment method; Returned by JS SDK “Authorize” call; Saved in JSON format
KlarnaExpressCategoryThe KEB payment category; Currently applicable for US and defaults to “pay_over_time”
KlarnaPaymentsRedirectURLThe URL to redirect the customer to after placing the order; Returned by the “Create Order” API call
'kpActive_' + countryCodeFlag to indicate if Klarna is enabled for current site country
'kpActivationSource_' + countryCodeKlarna Activation source per country - Custom Object or Site Preferences. It is empty for old Klarna Countries config
'kpActivationKey_' + countryCodeKlarna Activation key in case of Custom object usage.

The following cookies are being set by the Klarna cartridge integration:

Cookie NameDescription
selectedKlarnaPaymentCategoryThe selected payment method on checkout (e.g. “pay_later”)

In addition to the configurations, the following two library assets will be added:

  • footer-about: An updated Out-of-the-Box (OOTB) asset that includes a link to the Klarna On-site messaging (OSM) dedicated page in the footer.
  • klarna-email-info: An asset containing links to review Klarna Payment information, which is used in the confirmation email sent to customers.

An HTTP service, klarna.http.defaultendpoint, has been added with the klarna.http.service profile.

  • Deprecation Notice for Version 24.4.0: Service credentials and the KlarnaCountries custom object have been deprecated as of version 24.4.0. Please use the Klarna Activation Site Preferences or the Klarna Activation custom object to enter API credentials.
  • Replication Guidance for Version 21.2.0: Prior to version 21.2.0, the KlarnaCountries custom object was replicable. To avoid issues with service credentials during replication, merchants should use the same service credential name across staging, development, and production environments.

For more details on updating the KlarnaCountries definition in your instances, please review Section Update KlarnaCountries Definition.

Klarna Sign In Service

klarna.http.signIn with klarna.http.signIn profile and klarna.signin.credentials credentials. URL is populated dynamically for Activation configuration. For deprecated Klarna Countries setup service credentials URL should be updated on production.

The integration includes the following types of logs:

  • Service Communication Logs: These logs start with service-klarna-*** and contain every request and response to the Klarna endpoints. Personal information, such as emails and names required for the Klarna API calls, is masked in these logs.
  • Custom Errors and Debug Info: Depending on the case, custom errors and debug information are logged under customerror-***, custodebug-***, and custominfo-*** files.

Cartridge functionality is dependent on the availability of the Klarna API service. The current operational status of Klarna can be viewed at Klarna Status.

For reporting core SFCC functionality issues in the Klarna cartridge technical integration, please contact: commercecloud@klarna.com.

For production issues related to Klarna API availability, merchant representatives should reach out to their Klarna Account Manager after reviewing the current operational status at Klarna Status.

Pre-requisite information to provide when reporting an incident:

  • Merchant's affected MID or market
  • Impact and examples of customer orders (order_id or Klarna session_id if available)
  • Screenshots, timeframe, and any additional information as required

This information helps speed up the investigation and resolution process.