This section provides an overview of the Klarna extension for Adobe Commerce, including its main features, integration capabilities and supported modules.
Adobe Commerce, powered by Magento, is a leading e-commerce platform that offers businesses unparalleled flexibility and control over the look, functionality, and operations of their online stores. Tailored for both B2B and B2C markets, it provides a rich set of features, including personalized shopping experiences, mobile commerce, and advanced marketing tools.
Klarna works with Adobe Commerce to let your customers choose how they want to pay and supports the purchase with buyer protection and excellent customer service.
Your customers can buy now and pay later, while you receive payment in full at the time of purchase.
Learn more on how to enable Klarna in Adobe Commerce versions 2.4.4 and above here.
The Klarna extension offers the following main features:
Market availability | All regions supported by Klarna Payments |
Payment solutions | Klarna Payments directly or via a PSP |
Klarna payment methods | All available on the Klarna merchant ID |
Express Checkout | Yes (Multi-step) |
On-Site Messaging | Yes |
Sign in with Klarna | Yes |
Order Management | Yes |
Order cancellation | Yes |
Partial and full capture | Yes |
Partial and full refund | Yes |
Update order | Yes |
Crossborder support | Yes |
You can use the extension both if you are enabling payments through Klarna's plugin or another payment partner's plugin to grow your sales with Klarna's additional features listed above.
Before you install the Klarna extension, ensure you meet the following requirements:
Release notes for every version are available for the Klarna extension here to help you get an overview of what changes were introduced in each version. We always recommend the latest version, as this has the latest features and performance improvements.
Included Klarna products: Payments, Order Management, and Conversion boosters:
The Klarna extension consists of smaller building blocks called modules. Read this article to learn more about the modules.
This admin-settings
module is responsible for all Klarna setting in the admin. That means with this module the admin configurations are configured, rendered and returned for the respective Klarna products.
The backend
module sends the Order management API requests to Klarna. This includes all post-order captures, refunds, and cancellations. The starting entry points for each of these actions can be found in Gateway/Command
. If the API request to Klarna returns a successful response, the order in Adobe Commerce will be handled in the same way. For example, if the order was successfully canceled in Klarna, it will then be canceled in the shop as well.
In the base
module, you can find the basic helper and settings which are used by other Klarna modules.
The kec
module supports Klarna Express Checkout Conversion booster, more info here
All API requests and all other API related actions from all modules should be done from this klarna-api
module. This already happened for a wide range of module but not for example klarna-payments
The purpose of the logger
module is to save API requests and responses to the database and return them if needed. The information is stored in a separate Klarna table. The key components of the logger
module are:
Cron
contains cron jobs for cleaning old logging entries and updating the increment IDModel/LogRepository.php
updates and returns the logging entries from the klarna_logs
table. You can find the migration for it in etc/db_schema.xml
.The logger module has dependencies with the following Klarna modules:
backend
base
kco
payments
The onsitemessaging
module contains all of the logic for Klarna On-site messaging (OSM). The OSM logic isn’t complex. The most important information about the module is the classes in the Block
directory. These classes determine if OSM is displayed on specific pages, for example, product and cart pages. Refer to these classes if you want to modify how the messaging is displayed, or to understand how OSM works.
The payments
module contains all the logic that makes Klarna payments work. The key components of the payments
module are:
Model\Api\Builder\Request.php
is a class responsible for creating the API request parameter.Model/PaymentMethods
classes are responsible for returning the correct payment methods shown on the checkout page.Model/KpConfigProvider.php
: the return values of the getConfig()
method are used in the whole Klarna payments JavaScript flow and define how Checkout behaves after specific actions.Model/QuoteRepository.php
updates and returns the Klarna payments quote from the klarna_payments_quote
table. You can find the migration for it in etc/db_schema.xml
.Model/Session.php
is a class that allows you to create or update a payment session.view/frontend/web/js
contains all JavaScript files that fuel Klarna payments.The payments module has dependencies with the following Klarna modules:
logger
base
payments-graph-ql
The payments-graph-ql
module is an extension of the payments module and enables placing Klarna with GraphQL. The entry point for its logic is stored in Model/Resolver/CreateKlarnaPaymentsSession.php
. In this class, a Klarna session is initiated and the client token and payment methods are returned.
The payments-graph-ql
module has dependencies with the following Klarna modules:
base
payments
The plugins-api
module is performing the plugins api action. Its task is to trigger a API call to Klarna with shop specific settings as parameters and returns information about the status of the merchant Klarna products. Based on it the merchant will be identified for specific Klarna products flows as a merchant who is using Klarna as part of a PSP or as a merchant who offers Klarna without a PSP.
The siwk
module supports Sign in with Klarna Conversion booster, more info here
This module provides the logic for the support form which is available in the Admin. The key components of the support
module are:
Controller/Adminhtml/Index
contains actions that are triggered when a user attaches a file or clicks the Send button.Mail/Template/TransportBuilder.php
is the key class when it comes to adding attachments and sending the mail.