Klarna Docs - Installing Klarna Payments as an alternative payment method on Shopify (HPSDK)

Installing Klarna Payments as an alternative payment method on Shopify (HPSDK)

This HPSDK Klarna Payments option is no longer available for new integrations; instead new integrations can use the new Klarna payments integration.

The alternative payment methods listed below supported the HPSDK integration, which is no longer available for new installations, and will be deprecated by 2022-June-30 for existing merchants.

Instead integrations should use the new Klarna payments integration.

Private alternative payment method nameLanguage
Betal nu. KlarnaDanish
Del betalingen op. KlarnaDanish
Køb nu. Betal senere. KlarnaDanish
Betaal nu. KlarnaDutch
Betaal later. KlarnaDutch
Buy now, pay later with KlarnaEnglish
Pay now. KlarnaEnglish
Pay over time with Klarna.English
Verkkopankki- ja korttimaksu. KlarnaFinnish
Maksa myöhemmin. KlarnaFinnish
Pilko maksut. KlarnaFinnish
Payez de suite. KlarnaFrench
Acheter maintenant, payer plus tard avec KlarnaFrench
Sofort bezahlen mit KlarnaGerman
Rechnung mit KlarnaGerman
Ratenkauf mit KlarnaGerman
Paga ora. KlarnaItalian
Compra ora, paga dopo con KlarnaItalian
Direktebetaling. KlarnaNorwegian
Få først. Betal senere. KlarnaNorwegian
Del opp. KlarnaNorwegian
Kup teraz, zapłać później z KlarnaPolish
Paga ahora. KlarnaSpanish
Compra ahora, paga después con KlarnaSpanish
Direktbetalning. KlarnaSwedish
Få först. Betala sen. KlarnaSwedish
Dela upp. KlarnaSwedish

Klarna offers an app on the Shopify app store to enable you to easily promote Klarna on your store. The app can be installed from https://apps.shopify.com/klarna-on-site-messaging Additional details about the app available at: On-site messaging app for Shopify

By default, shipping phone number is optional in Shopify checkout, but Klarna Payments requires that both phone and email are supplied. If the phone number or email is not provided to Klarna, on redirect from Shopify, the consumer will be given an error message and redirected back to the Shopify checkout.  To avoid errors and provide a streamlined consumer experience, set phone number as required in Shopify admin by navigating to Settings → Checkout → Form options:

To require email in Shopify Checkout, under Shopify admin →  Settings →  Checkout →  Customer contact, choose the “Customers can only check out using email”. 

A sample install video can be seen at Klarna Payments on Shopify Install video.

A sample customer experience can be seen at Klarna Payments on Shopify Customer Experience video and also real-time at public demo store: https://klarnastore.myshopify.com

Klarna Merchant Portal

If the Klarna Payments page does not load successfully, please check the following.  Please also review the Logs within the Klarna Merchant Portal to check for error codes & messages.

  1. Please verify your Klarna API credentials (username & password) are correctly entered in both the Klarna Payments app configuration and in your Shopify store (under Alternative Payment Methods).  The Klarna API credentials entered in your Shopify admin alternative payment method(s) MUST exactly match (including whitespace and upper vs lower case) the credentials entered in the 2nd tab of the setup wizard (include Test Mode setting).  We recommend copying & pasting the credentials rather than typing them directly.  (error code: 401, error message: UNAUTHORIZED or Oops error - If you are a Shopify administrator for this store)
  2. If you’ve regenerated Klarna API credentials, if you update Shopify with new credentials in the alternative payment method configuration, you will also need to update the Klarna Payments app API credentials.  Note: as documented in the Known Issues section below, updating the Klarna API credentials can sever communication for previously placed orders, so updating Klarna API credentials  is not recommended unless necessary.  Both credentials must match for the integration to work successfully.  Check the following places: the Klarna credentials under Shopify admin → Settings → Payment providers → Alternative payment methods → all active Klarna alternative payment methods AND Shopify admin → Apps → Klarna Payments (which redirects to the setup wizard)
  3. Verify that your Shopify’s configured store currency (in Shopify admin → Settings → General → Store currency) matches the currency you’ve contracted for with Klarna. Klarna Payments does not support EU stores selling in USD, but can support EU stores selling in EUR.(error code: 400, error message: Bad value: purchase_currency)
  4. If the Klarna Payments page is still not loading successfully, please contact Klarna Merchant Support.

The app is needed to support the data needs of the payment method as well as the back end integration. Shopify, by default, only transmits the billing/shipping information and cart value in the redirect request to the payment method provider. For Klarna to make the best possible decisions for offering payment terms and have required data to place the order in Klarna, the order line item data is also needed.  Shopify generally restricts payment processing apps to be unlisted apps, so the Klarna Payments app is not publicly available in the Shopify app store.  This Klarna Payments app for Shopify is required and installed during the setup process:


Shopify does not yet support alternative payment methods, like Klarna, to integrate into Shopify's POS sales channel. Customers in store can still easily still pay with Klarna using Shopify Draft Orders though. To do so, follow 3 easy steps:

  1. Create a Shopify draft order for a customer (with optional customer details prepopulated) with the desired products. (Do not check "Payment due later" or set the order as "Paid").
  2. Email the invoice to the customer from the Shopify draft order admin page using the "Send invoice" button.
  3. The customer then can pay for the draft order via your Shopify store's Online Store sales channel using your store's Shopify web checkout and choose Klarna (or any payment option available in checkout).

Klarna’s order management will work for Shopify draft orders paid with Klarna when the order is fulfilled, cancelled, or refunded in the Shopify store admin (since the order uses the same Klarna Payments alternative payment method as other Klarna online orders).

If using Shopify draft orders for in-store customers, Klarna recommends adding a 0 value product named “Ship to store”, which should be set as not available for your sales channels, as shown in the screenshot below.  When creating Shopify draft orders, add the “Ship to store” product to the customer’s order to trigger the Klarna Payments fraud review logic for in-store customers.

If the “Ship to store” product is not included in the order, Klarna orders could get Pended for fraud review, which is not desired for in-store orders. 

Note: Klarna cannot currently accept Shopify Draft Orders marked as “Payment pending”, which is set when a draft order is checked as "Payment due later". Pending payment draft orders create a Shopify order, instead of a Draft order, and then adding a payment method would use the Order Edit flow, which is not currently able to be supported, per Known Issue #7: “Editing Klarna orders in Shopify admin not yet supported” . This functionality will hopefully be supported in the future with the upcoming Shopify new Payments architecture. Note: only draft orders marked as "Payment pending" update Shopify inventory.

Shopify restricts all alternative payment methods, such as Klarna Payments, to only process orders in the store’s base currency, as documented at: 


“Only Shopify Payments can process payments in a customer's local (presentment) currency. If your customer chooses a payment option from a different payment provider, then their payment is made in the currency of your store.”  

See also Known Issue: “Klarna Payments accepts orders only for customer billing addresses in the markets that match the store base currency”.

For Shopify Plus merchants, please also see: “Shopify Plus: custom scripts” section below if you would like to hide Klarna Payments in checkout based on certain cart data.

If your Shopify store is a test store or your store is not yet live, and you have Klarna API test credentials, then check Test mode. Klarna recommends that you only activate an alternative payment method in test mode (only recommended for test stores).  If you do have a test store, you will repeat the setup wizard for your live store using production credentials once testing is complete.  Test mode should not be used for live stores as Klarna does not pay out for orders made against Klarna’s test environment.  

If production Klarna API credentials are used and test mode is checked for the Shopify payment method, orders will be blocked with an error.  If test orders are desired, Klarna API test credentials should be used (but this is not recommended for live stores).

This integration requires each Shopify store to have a unique set of Klarna API credentials.  These credentials cannot be shared across stores.  If Klarna API production credentials were installed using a test store, a Klarna person will need to delete that configuration before those same credentials can be used for a live store.  Klarna API test credentials are recommended for test stores.