Klarna Docs - Klarna Shipping Assistant configuration

Klarna Shipping Assistant configuration

Klarna Shipping Assistant (KSA) is used for handling the shipping methods in your store. However, it is still required to have at least one native Magento shipping method active for each destination country you sell to. This is required as a fallback in case there are issues with connecting to the shipping provider (TMS) from Klarna.

Enable KSA

When using Klarna api credentials for using KSA you need to enable this feature in the admin. Under Stores ⇒ Configuration ⇒ Sales ⇒ Payment Methods ⇒ Klarna ⇒ Klarna Shipping Service you will find the respective setting

Klarna Shipping Assistant should also be enabled and configured in Klarna Merchant portal.

Klarna Shipping Options

When using Klarna Shipping Assistant, it is necessary to send product specification data to Klarna (eg height, length, width, and weight). You can define which attributes hold this data using this configuration section:

Retrieving shipping info via Magento API

You can retrieve information about an order that was placed with Klarna Shipping Assistant enabled using the Magento REST Api.The Endpoint for this is getDeliveryDataByKlarnaSessionId. This will return you the delivery details for the order of a given Klarna session id, hence you need to provide this session id on the request.

An example request would look like this:

https://your-shop.com/rest/V1/getDeliveryDataByKlarnaSessionId/443x122e-cf97-6cf6-af34-ccf0229ba604

It will return all the delivery details, that were provided by the TMS (eg. pickup_location etc.). 

An example response would be:

JSON
{
  "carrier": "postnord",
  "class": "standard",
  "pickup_location": {
    "id": "loc-1",
    "name": "ICA supermarket",
    "address": {
      "street_address": "Hamstadsv\\u00e4gen 50",
      "postal_code": "12151",
      "city": "Johanneshov",

Sending tracking information to Klarna

When using Klarna Shipping Assistant, as part of your agreement with Klarna you are required to provide Klarna with tracking information. You can do this as part of the “Invoice” step in Magento. When viewing an order:

  1. Click the “Invoice” button in the top right corner
  2. In the Shipping Information section, tick the checkbox for “Create Shipment”.
  3. Select “Klarna” for the Carrier
  4. Enter a title for the shipping method
  5. Enter the tracking number
  6. Fill out the rest of the invoice
  7. Submit the invoice

FAQ

Do we support shipping tags in Magento?

We currently only support tags on the order line level. We send the categories a product is assigned to as a tags. 

KSA setting is disabled, but callbacks are still appear and fail.

If you don’t want to use KSA, you have to disable that both in admin AND in Merchant Portal.

How to add a new TMS company?

If this company already works with Klarna, you need to configure your account in section "Logistics" in Merchant portal.