Klarna for WooCommerce

General information

This is the documentation for version 2.0 of the Klarna extension for WooCommerce.

This version is currently in open beta. Bug reports can be emailed to support@krokedil.com.

Klarna Gateway is a plugin that extends WooCommerce, allowing you to take payments via Klarna. With this extension you get access to Klarna’s three payment methods – Klarna Checkout, Invoice and Part payment.

  • Klarna will only work in Sweden, Denmark, Finland, Norway, Germany, Austria, the Nederlands, UK & US.
  • You will need an agreement with Klarna for each country and payment method you plan to sell to/with. Contact Klarna for more information about available payment alternatives for your specific country.
  • A SSL Certificate is required for UK & US.

Related Documentation

Installation

  1. Download and unzip the latest release zip file.
  2. If you use the WordPress plugin uploader to install this plugin skip to step 4.
  3. Upload the entire plugin directory to your /wp-content/plugins/ directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress Administration.
  5. Go to –> WooCommerce –> Settings –> Checkout and configure your Klarna settings.

Configuration: Invoice payment

  1. Navigate to –> WooCommerce –> Settings –> Checkout –> Klarna Invoice.
  2. Enable Klarna Invoice by checking the Enable Klarna Invoice checkbox.
  3. The Title and Description fields controls what the customer sees during checkout.
  4. On order completion – Check this box if you want to activate orders in Klarna automatically when the order is marked as Complete in WooCommerce.
  5. On order cancellation – Check this box if you want to cancel orders in Klarna automatically when the order is marked as Cancelled in WooCommerce.
  6. On order update – Check this box if you want to update orders in Klarna automatically when line items are updated in a WooCoommerce order.
  7. Enter your EID and Shared Secret  for the country that you have an agreement with Klarna to sell to.
  8. Lower threshold – If Cart total is less than the specified value, Klarna Invoice will be disabled in Checkout.
  9. Upper threshold – If Cart total is greater than the specified value, Klarna Invoice will be disabled in Checkout.
  10. Invoice Fee – Enter the product ID of your Invoice Fee product. More information about this can be found in the Invoice Fee Handling section below.
  11. Send billing address as shipping address – Check this box if you want to send the entered billing address in WooCommerce checkout as shipping address to Klarna.
  12. Klarna consent terms – Enable Klarna consent terms checkbox in checkout. This only apply to German merchants.
  13. If you have applied for and received a testaccount, then you must check the Enable Klarna Testmode checkbox.
  14. Save your settings.

Invoice fee handling

The invoice Fee for Klarna Invoice are added as a simple (hidden) product. To create a Invoice fee product:

  1. Add a simple (hidden) product. Mark it as a taxable product. For more information on how to add a simple (hidden) product please check WooCommerce documentation page on Adding and Managing products.
  2. Go to the Klarna Gateway settings page and add the product ID (not the price or the SKU) of the Invoice Fee product. The ID can be found by hovering the Invoice Fee product on the Products page in WooCommerce.

Configuration: Part payment

  1. Navigate to –> WooCommerce –> Settings –> Checkout –> Klarna Part Payment.
  2. Enable Klarna Invoice by checking the Enable Klarna Part Payment checkbox.
  3. The Title and Description fields controls what the customer sees during checkout.
  4. On order completion – Check this box if you want to activate orders in Klarna automatically when the order is marked as Complete in WooCommerce.
  5. On order cancellation – Check this box if you want to cancel orders in Klarna automatically when the order is marked as Cancelled in WooCommerce.
  6. On order update – Check this box if you want to update orders in Klarna automatically when line items are updated in a WooCoommerce order.
  7. Enter your EID and Shared Secret  for the country that you have an agreement with Klarna to sell to.
  8. Lower threshold – If Cart total is less than the specified value, Klarna Part Payment will be disabled in Checkout.
  9. Upper threshold – If Cart total is greater than the specified value, Klarna Part Payment will be disabled in Checkout.
  10. Send billing address as shipping address – Check this box if you want to send the entered billing address in WooCommerce checkout as shipping address to Klarna.
  11. Klarna consent terms – Enable Klarna consent terms checkbox in checkout. This only apply to German merchants.
  12. If you have applied for and received a testaccount, then you must check the Enable Klarna Testmode checkbox.
  13. Save your settings.

Configuration: Klarna Checkout

  1. Navigate to –> WooCommerce –> Settings –> Checkout –> Klarna Checkout.
  2. Enable Klarna Checkout by checking the Enable Klarna Checkout checkbox.
  3. Get in contact with Klarna and inform them that you are about to set up a store that will use Klarna Checkout. They will then send you a temporary EID and Shared Secret for testing purposes. Klarna Checkout will NOT work with your Klarna checkout credentials yet. You will get a fatal error if you use credentials from an account that not has been set to live mode.
  4. On order completion – Check this box if you want to activate orders in Klarna automatically when the order is marked as Complete in WooCommerce.
  5. On order cancellation – Check this box if you want to cancel orders in Klarna automatically when the order is marked as Cancelled in WooCommerce.
  6. On order update – Check this box if you want to update orders in Klarna automatically when line items are updated in a WooCoommerce order.
  7. Create a new page that act as the Checkout page for Klarna Checkout.This page can not act as the standard WooCommerce Checkout page.This page must contain the shortcode [woocommerce_klarna_checkout], but can also contain one or several extra shortcodes for added functionality. Read more about how to configure the checkout in the section Configurating the Klarna Checkout page below.
  8. Enter the full URL to the just created Checkout page for Klarna Checkout in the settings field Custom Checkout Page.
  9. If you want a separate page to act as the thank you page, enter the full URL to that page in the settings field Custom Thanks Page.
  10. Default Checkout Country – This is used by the payment gateway to determine which country should be the default Checkout country if Euro is the selected currency, you as a merchant has an agreement with multiple countries that use Euro and the selected language can’t be of help for this decision.
  11. Modify Standard Checkout – Check this box if you want to use the Klarna Checkout page as the default checkout page (i.e. changing the url of the checkout buttons in Cart and the Widget mini cart).
  12. Button to Standard Checkout – Check this box if you want to add a button on the Klarna Checkout page that links to the Standard Checkout Page.
  13. Label for Standard Checkout Button – Enter the text for the button that links to the Standard Checkout page from the Klarna Checkout page.
  14. Button to Klarna Checkout – Check this box if you want to add a button on the WooCommerce standard checkout page that links back to the Klarna Checkout page.
  15. Label for Standard Checkout Button – Enter the text for the button that links back to the Klarna Checkout page from the standard checkout page.
  16. Terms Page – Add the full URL to your terms page. You can also specify a terms page in WooCommerce standard settings. A terms page must be specified in one of these two places for Klarna Checkout to work.
  17. Create customer account – Check the box if you want to automatically create an account for new customers.
  18. Send New account email when creating new accounts – check the box of you want to send the WooCommerce New account email when creating an account for a new customer.
  19. Account Signup Text – Add text above the Account Registration Form. Useful for legal text for German stores. Leave blank to disable.
  20. Account Login Text – Add text above the Account Login Form. Useful for legal text for German stores. Leave blank to disable.
  21. Test Mode. Check this box to enable Klarna Test Mode. This will only work if you have a Klarna Checkout test account. For testing with test credentials read more here.
  22. Debug – Enable logging. The log messages can be displayed by navigating to:
    –> WooCommerce –> System Status –> Logs
  23. Design options
    To make Klarna Checkout fit your e-store’s visual design and brand colors, you have the option to set the color of certain elements in Klarna Checkout. The following elements can be modified:– Checkout button color
    – Checkout button text color
    – Checkout checkbox color
    – Checkout checkbox checkmark color
    – Checkout header color
    – Checkout link color
  24. Automatically activate recurring orders – If this option is checked, recurring orders (together with the WooCommerce Subscriptions extension) will be activated automatically when a renewal order is created in WooCommerce.
  25. After you have saved the Klarna Checkout settings, you can start making test purchases (still with the test credentials obtained from Klarna). Use customer testing credentials from developers.klarna.com/en.

 

Configuring the Klarna Checkout page

The page that is used for rendering the Klarna Checkout form can be set up in different ways to suite your needs.

Klarna Checkout page v2.0

  • The page must contain the shortcode [woocommerce_klarna_checkout]
    (for displaying the checkout form).
  • The page can optionally contain the shortcode [woocommerce_klarna_checkout_widget]
    (for displaying cart items, coupon handling and shipping alternatives).
  • The page can optionally contain the shortcode [woocommerce_klarna_country]. This shortcode displays a country selector that makes it possible for your customers to select their country if you have an agreement to sell with Klarna Checkout for more than one country that uses Euro as currecy.

Responsive layout

To get a responsive checkout with the cart item widget on the left and the checkout form on the right you add the shortcodes with the following attributes:

[woocommerce_klarna_checkout_widget col="left"]
[woocommerce_klarna_checkout col="right"]

On smaller screens the cart item widget will be displayed at the top of the page and the checkout form below.

Shortcode attributes

The [woocommerce_klarna_checkout_widget] short code accepts a few additional (optional) parameters:

  • hide_columns
    – remove (the remove product from cart button column).
    – price (the item price column).
  • order_note
    – false (removes the order note input field)

Example

[woocommerce_klarna_checkout_widget col="left" hide_columns="remove,price" order_note="false"]

Configuration: Klarna Checkout for German stores

If Klarna Checkout is used in German stores there are a couple of extra things to be aware of.

1. Account Sign up page

If it’s possible for the customer to create an account in the store, this text should be displayed for the customer on the signup page:

English version:

We use Klarna Checkout as our checkout, which offers a simplified purchase experience. When you choose to go to the checkout, your email address, first name, last name, date of birth, address and phone number may be automatically transferred to Klarna AB, enabling the provision of Klarna Checkout. These User Terms apply for the use of Klarna Checkout.

German version:

In unserem Kassenbereich nutzen wir Klarna Checkout. Dazu werden Ihre Daten, wie E-Mail-Adresse, Vor- und Nachname, Geburtsdatum, Adresse und Telefonnummer, soweit erforderlich, automatisch an Klarna AB übertragen, sobald Sie in den Kassenbereich gelangen. Die Nutzungsbedingungen für Klarna Checkout finden Sie hier.

These User Terms and/or  Sie hier in the text above should link to https://cdn.klarna.com/1.0/shared/content/legal/terms/EID/de_de/checkout

Note that “EID” in the URL needs to be changed to your stores actual EID.

2. Account Login page

When pre-population of form fields in Klarna Checkout is activated for logged in customers, the following text needs to be visible on the login page:

Ich stimme den Nutzungsbedingungen und der Anwendung meiner Daten in der Express Kasse zu.

Nutzungsbedingungen should contain a link to: https://cdn.klarna.com/1.0/shared/content/legal/terms/{EID}/de_de/checkout

Note that {EID} in the URL needs to be changed to your stores actual EID.

3. Terms page

On the Terms page, under “Zahlung”, the following text should be presented:

Zahlung In Zusammenarbeit mit Klarna bieten wir die folgenden Zahlarten an:

  • Klarna Rechnung: Zahlbar innerhalb von 14 Tagen ab Rechnungsdatum. Die Rechnung wird bei Versandt der Ware ausgestellt. Die Rechnungsbedingungen finden Sie hier.
  • Klarna Ratenkauf: Mit dem Finanzierungsservice von Klarna können Sie Ihren Einkauf flexibel in monatlichen Raten von mindestens 1/24 des Gesamtbetrages (mindestens jedoch 6,95 EUR) bezahlen. Weitere Informationen zu Klarna Ratenkauf einschließlich der Allgemeinen Geschäftsbedingungen und der europäischen Standardinformationen für Verbraucherkredite finden Sie hier.
  • Sofortüberweisung
  • Kreditkarte (Visa/ Mastercard)
  • Lastschrift

Informationen darüber, welche Zahlarten für einen konkreten Einkauf zur Verfügung stehen, erhalten Sie im Kassenbereich. Allgemeine Informationen zu Klarna erhalten Sie hier.

Here there are also two URL’s where the EID needs to be updated, one under Klarna Rechnung and one under Klarna Ratenkauf.

4. Checkout page

  • Klarna Checkout should be presented with the title “Express-Kauf”.
  • Add the following text above the iframe:

Schließen Sie Ihren Einkauf ab – sicher, schnell & einfach. Beginnen Sie mit der Eingabe Ihrer E-Mail Adresse und Postleitzahl.

Configuration: Klarna Checkout for UK & US

If Klarna Checkout is used in UK and/or US stores there are a couple of extra things to be aware of.

  • US and UK merchants can allow customers to ship to an address different than the billing address.
  • US and UK merchants does also have the possibility to choose which countries to ship to.
  • HTTPS is required for US and UK merchants.

Read more about how to configure these features in our separate post here.

Sell to multiple countries

By default you as a merchant makes an agreement with Klarna to sell to customers in one country. If you want to sell to customers in multiple countries you will need:

  1. An agreement with Klarna for each country.
  2. Make sure that your store is able to change the currency and country code that is sent to Klarna so it is consistent with the country the customer is coming from.

This means that if, for example, you have a Swedish store (where the base country is set to Sweden and the currency to SEK) and you have a Norwegian customer who wants to pay via Klarna, your store has to switch the currency to NOK and at the same time inform Klarna that it is a Norwegian purchase.

The Klarna payment gateway is prepared for this, but since WooCommerce doesn’t support multiple currencies out of the box, you need to install additional plugins for this.

Multiple currencies in WooCommerce – here’s how to do it

To enable support for multiple currencies, you need to install one of the following plugins:

Update your Klarna payment gateway settings

Once you have created multiple currencies and you see that it works in your store it’s time to configure your Klarna settings.

  1. For each country you have an agreement with Klarna, you fill in Eid and Shared Secret on the settings page for the specific payment method.
  2. For Klarna Checkout it’s also important that you add the Checkout page and Thank you page for each country, even if these pages are the same for all countries (this feature is mainly developed for those who also have different languages ​​in their store).
  3. Also remember that for Klarna Checkout each Checkout page and Thank you page need to have the shortcode [ woocommerce_klarna_checkout ] pasted on the page.

Once this is done, everything should work. If you’re using Klarna Checkout, do not enable a currency switcher feature on the actual KCO checkout page. This may cause some issues with the order in Klarnas system if the customer switches currency after the Klarna Checkout page is rendered.

Payment Method Widget

The payment method widget informs consumers which payment methods you offer, and helps increase your conversion. The part payment widget automatically determines which payment method is the most appropriate for this product and calculates the total monthly cost for the consumer according to applicable laws and regulations.

For products with a price from (approximately) 3 000 SEK the widget will display an example of the monthly cost when paying with Klarna Part payment. For products with a price lower than that the widget will display a generic “Pay with Klarna” notice.

  1. Navigate to –> WooCommerce –> Settings –> Products –> Klarna Payment Method Widget.
  2. Monthly cost – Check the box to display the payment method widget on single product pages.
  3. Monthly cost placement – Select where to display the widget in your product pages.
  4. Lower threshold – If the product price is lower than the threshold, the widget will not be displayed.
  5. Upper threshold –  If the product price is higher than the threshold, the widget will not be displayed.

Payment Method Display

By using Klarna’s Payment method display you generate trust and increase your conversion. Once you’ve done this, you’ll never have to update your Payment method display again. Klarna host them for you, ensuring maximum availability and fast loading times.

  1. Navigate to → AppearanceWidgets.
  2. Drag the widget Klarna Payment Method Display Widget into one of your themes available widget areas.
  3. You can now configure the appearance of the widget via the following settings:
    Design: Long or short
    Color: Blue or white
    Width: The width in pixels that the image should be rendered in.

What's new in version 2.0?

tl;dr

The following features is probably the most interesting ones if you’re an old Klarna for WooCommerce user.

  • An improved Klarna Checkout page where you’re able to view and update the contents of the shopping cart, available shipping options and coupon management. Read more about this in the section Configuring the Klarna Checkout page.
  • Ability to activate, update, refund and cancel orders in Klarna’s system directly from WooCommerce. Red more about this in the document Klarna for WooCommerce – Order management.
  • Support for subscription payments through Klarna Checkout (and WooCommerce Subscriptions). Read more about this in the document Klarna for WooCommerce – Recurring payments.
  • Support for Klarna Checkout in Austria.

Changelog

For more detailed information about the changes in the new version, here’s the changelog:

  • Feature – Added Klarna order activation from WooCommerce.
  • Feature – Added Klarna order cancelation from WooCommerce.
  • Feature – Added Klarna order update from WooCommerce.
  • Feature – Added Klarna order refund from WooCommerce.
  • Feature – Added support for subscription payments via Klarna Checkout (SE, NO, FI).
  • Feature – Added support for KCO Austria.
  • Feature – Added Cart to the Klarna Checkout page (via the new KCO cart widget).
  • Feature – Added Shipping to the Klarna Checkout page (via the new KCO cart widget).
  • Feature – Added Coupon management to the Klarna Checkout page (via the new KCO cart widget).
  • Feature – Added a country selector to the Klarna Checkout page (via the new KCO cart widget), when selling to multiple EUR countries.
  • Feature – Moved customer order note field into the new KCO cart widget.
  • Feature – Added support for Table rate Shipping (KCO) where shipping is depending on the customers postal code.
  • Feature – Updated flow for orders that are marked *Needs pending approval from Klarna* (KPM). Order status is now set to On Hold and a cronjob is checking the orderstatus with Klarna every 2 hours.
  • Feature – Added Shipping and payment info from Klarna in order confirmation (on thank you page for KPM and in order emails sent from WC).
  • Feature – Started implementing Klarnas Remarketing feature for KCO. All local WC orders (when selecting KCO as payment method but not finalizing the purchase) does now include the customers email address.
  • Feature – Added setting in KCO to make it possible to display a button with a link back to the KCO page in WooCommerce standard checkout.
  • Feature – Added a new WP widget for displaying Klarna as an available payment option in the store.
  • Feature – Added Klarna’s Part payment widget (display monthly cost on product pages) even for KCO (previous only KPM).
  • Tweak – Code refactoring.
  • Tweak – Change Klarna Invoice, Account and Special campaign to two payment methods instead of three different. They are now called Invoice and Part payment.
  • Tweak – Add customer info from Klarna to WooCommerce (name, phone etc) when creating users automatically with KCO.
  • Tweak – Change how and when order in WooCommerce is created when customer pays with Klarna Checkout. WooCommerce order is now only created on rendering of the KCO page if customer is logged in. Otherwise the local order is created when customer enters email address in KCO form. WooCommerce orderstatus is set to KCO incomplete until the order is confirmed from Klarna. This way incomplete orders won’t clutter up the order list view and product stock isn’t reserved until the order actually is finalized.
  • Tweak – Updated translation files and updated Swedish and Norwegian translations.
  • Fix – Fixed Get Address class so it doesn’t instantiate other classes and optimized company flow.

After Installation

When the installation is done and you are ready to go live you need to contact Klarna integration support. Klarna will then verify the integration before the shop goes live. If you don’t do this you risk getting a lot of test orders that will disappear when the shop goes live.