Getting started

You can set up the Klarna Shipping Assistant in Klarna Merchant Portal. There, you can input your API credentials so Klarna can show real-time shipping options in the checkout.

To get the Klarna Shipping Assistant, you can either use one of our existing partnerships or integrate our Shipping API directly .

Preparation

Before you get started, make sure you have everything you need:

  • Klarna Checkout v3 integration. Click here to learn more about direct or partner integrations.
  • Fallback. You can optionally provide fallback shipping options when you create a Checkout session. We use those options if the Shipping API integration is not responding or otherwise fails. This way, we ensure the user can always complete their purchase.

Checkout integration

If you have an existing Checkout v3 integration, you should adjust the following for an ideal integration:

  • You can set allow_separate_shipping_address to true if you want to offer separate shipping and billing. If this flag is false or not set, the displayed delivery options will be based on the billing address.

  • You can indicate with the shipping_countries list countries you ship to. If it’s not set, it will default to the purchase country only.

  • You can define shipping_attributes at the order level or at the order line level. These are passed on to the Shipping API and can influence the available shipping options.

    • Shipping attributes are weight, dimensions, and tags. Weight and dimensions can only be set at the order line level.
    • Tags can be set at both levels.
      • Example tags: dangerous_goods, out_of_stock, oversize, member.
      • Example use cases: Offer free shipping for gold members, tag the order with member.
  • You can show delivery information after the checkout on the confirmation page.

  • You can send fallback shipping options for every KCO session. These are used if the Integrator fails to provide real time data.

  • You should not use the shipping_options_update callback from KCO. If you implement it, you will have to set the shipping fee as an order line in every call.

  • You cannot use our Shipping API flow for digital products (e.g. giftcards which are not shipped physically), as they are currently not supported. If there are no physical items in the cart, we recommend not to show KSA at all. To do this:

    This will suppress the Shipping Assistant.

Instant Shopping integration

If you have an existing Instant Shopping integration, you should adjust the following for an ideal integration:

When creating a button key from the server side:

  • You should set allow_separate_shipping_address to true if you want to offer separate shipping and billing. If this flag is false or not set, the displayed delivery options will be based on the billing address.

The following you can do either while configuring an Instant Shopping display through the JavaScript API from the client side, or while creating a button key through the REST API from the server side.

  • You must send fallback shipping options for every Instant Shopping shown. These are used if the Integrator fails to provide real time data. (JavaScript API | REST API)

  • You can indicate with the property shipping_countries the list of countries to which you ship. If it’s not set, it will default to the purchase country only. (JavaScript API | REST API)

  • You can define shipping_attributes

    • at the order level. (JavaScript API | REST API)
    • at the order line level. (JavaScript API | REST API) These are passed on to the Shipping API and can influence the available shipping options.
      • Shipping attributes are weight, dimensions, and tags.
  • When an order is authorized you will receive a ping to approve or decline the order at the merchant_urls.place_order endpoint. This endpoint you have defined when creating the button key. The request will include the authorized order, including information about the selected_shipping_option which includes the tms_reference.

Credentials

To activate the Klarna Shipping Assistant, you need to provide us with your shipping credentials in the merchant portal. The shipping credentials consist of an endpoint, an identifier and a key. How you obtain these credentials depends on the type of integration:

  • If you work with one of our partners , like Unifaun or Consignor, you will get the credentials from them.
  • If you implement the Shipping API directly, you should be able to provide us with these credentials.

Step by step

You can activate Shipping in the merchant portal.

  1. Log in to the merchant portal .
  2. Go to the Logistics app. There you can add your credentials and manage other logistics related settings.
  3. When activating the Klarna Shipping Assistant for the first time, you will have to accept the terms of use.
  4. You can easily add as many credentials as you want to. We will use the active credentials to fetch shipping options via the Shipping API.

You can come back to this app at any time to update your credentials.

Onboarding guides to our partners can be found on our partnership page .