This section provides an overview of the Klarna extension for Adobe Commerce, including its main features, integration capabilities and supported modules.
KCO no longer available in the Klarna Plugin from version 4
Klarna Checkout is no longer available in the Klarna extension for Adobe Commerce from version 4 and onwards.
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.
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.
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.
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.
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 ID
Model/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:
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:
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:
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.