The Klarna Checkout extension is a Klarna product that provides a checkout solution with a broad set of possibilities. For more information about Klarna Checkout see here. The extension replaces the original checkout. The main features of Klarna Checkout in the extensions are:
Not currently supported:
The extension has no technical restriction about which payment methods are allowed. As long as Klarna provides these in the respective markets and these payment methods are part of the contract between the merchant and Klarna they are shown and usable in the shop. The configuration of the payment methods is handled by Klarna. Based on it there is no need to do any configuration in the shop or on the extension.
General checkout configurations
The checkout experience can be set up in a wide variety of ways to achieve all wanted needs. For example, the following configurations can be done:
The settings for it can be found at Stores -> Configuration -> Sales -> Payment Methods -> Klarna -> Klarna Checkout.
Whenever a customer placed an order in Klarna Checkout on any page the used address will be used the next when this customer visits the checkout page - except it's not a logged-in customer with a configured address in the account. In this way, the customer does not have to add the address again. The customer is having a One-click checkout experience. This feature can be enabled at Stores -> Configuration -> Sales -> Payment Methods -> Klarna -> Klarna Checkout -> Pre-fill Options:
It's possible to define and configure checkboxes inside the Klarna Checkout to perform a specific action when the checkbox is checked and the order is placed. By default 2 actions can be performed: Newsletter Signup and Creating an account. Other actions can be defined but the logic for it has to be implemented. The configuration for the checkboxes is located at Stores -> Configuration -> Sales -> Payment Methods -> Klarna -> Klarna Checkout -> Added Checkbox Options:
Within Klarna Checkout, B2B (business to business) purchases are possible. The only thing that must be done is to enable B2B on the used Klarna API credentials and to enable B2B in the shop admin. The first action will be done from Klarna. The B2B setting in the shop can be found at Stores -> Configuration -> Sales -> Payment Methods -> Klarna -> Klarna Checkout -> Checkout General Settings:
Klarna Shipping Assistant is an extension of the “default” Klarna Checkout solution. It adds a shipping selector to the checkout. To use KSA, different things have to be done like enabling it in the MID and the shop and a contract with a TMS. You can find more information about it on the following page.
To add EMD (extra merchant data), the following method returns the request body, which will be send later as request to Klarna:
\Klarna\Kco\Model\Api\Builder\Kasper::getRequest()
It returns a array. To add EMD, create a “after” plugin on this method and add the respective information.
To include merchant_reference1 and merchant_reference2 data fields, e.g. to match the order's merchant references as included in Klarna's settlement files, you can create a “after plugin” for the method \Klarna\Orderlines\Model\Container\Parameter::getMerchantReferences
public function getMerchantReferences(CartInterface $quote)
{
$merchantReferences = $this->dataObjectFactory->create([
'data' => [
'merchant_reference_1' => $quote->getReservedOrderId(),
'merchant_reference_2' => ''
]
]);
return $merchantReferences;
Klarna Checkout provides a default design. This design does not always fit the used theme in the respective shop. Each store can have a different look and feel. The extension provides a way to change the default design so that it better fits the store. The design adjustment configuration can be found in the shop admin section Stores -> Configuration -> Sales -> Payment Methods -> Klarna -> Klarna Checkout Design: