Klarna Docs - Test Environment

Test Environment

Developer signup, test credentials

To try out the smoothest user experience when paying with Klarna, please request a test account by:

  1. Visiting the Merchant Portal button in the navigation of Klarna Docs.
  2. Select the region you'd like credentials for (e.g. 🇪🇺 Europe).
  3. Select the Playground environment.
  4. Click "Sign up"

Purchases completed in the test environment are not processed by our production system and will not result in proper invoices or any fees collected on invoices.

Klarna Docs - Getting API developer credentials

How to access the developer credentials sign up page

Note: You may not transfer any real personal data to us during testing. Depending on which product you have integrated, we offer a few different triggers

Klarna Checkout Test Triggers

In our playground (test) environment, you can use any valid address to make a test purchase. You can trigger different behaviour depending on your need. The following options are available:

Desired behaviourConsumer email address pattern
Only present pre-paid optionsexample-email**+red**@example.com

For example, you could use john.doe+red@abcstore.com as the customer’s email address to trigger a checkout that only offers pre-paid payment methods such as card.

Test Swish (Applies for Sweden)

In order to simulate swish approvals/denials/errors you need to add a specific additon to the email address. Current supported additions are:

Desired behaviourConsumer email address pattern
Successful Swish purchaseexample-email+success@example.co
Rejected purchaseexample-email+rejected@example.co
Swish specific error that will show a detailed error for the user.example-email+conflict@example.co

Klarna Payments Test Triggers

The default response from our test environment is positive. You can use various email addresses to trigger different (stateless) behaviour depending on your need. The following options are available:

Desired behaviourConsumer email address pattern
New sign up…“+require_signup@”…
Returning customerany email
Show form: False (only when prescreen is enabled)…“+red@"…
Approved: False…“+denied@"…
Pending…"+pend-{status}-{time delay}@"… * {status} the expected status after the time delay * Options are: accept or reject * {time delay} the time delay, in minutes, before the decision is made of {status} * Must be in two digit number format in the range 00-99. Note: Only works for US and UK.

For example, you could use john.doe+require_signup@abcstore.com as the customer’s email address to trigger Klarna’s new customer sign up dialogue within the widget

Test Direct Debit

In order to simulate/test the direct debit payment flow from end user perspective, use in the loaded Klarna widget, the following sample IBAN: DE11520513735120710131. Any other valid-format IBAN would work as well.

This section only applies to:

Test Credit Card

To simulate/test the card payment flow from the end-user perspective, use the following card details in the loaded Klarna widget:

Credit card number: 4111 1111 1111 1111
CVV: 123
Exp: 12/25 (Or any other valid date in the future)

Test Credit Card in Playground flow

This section only applies to:

Test Direct bank transfer in Playground flow

This section only applies to:
Image Thumbnail

Test Phone OTP (One Time Password)

To simulate/test the Phone OTP flow from the end-user perspective, use in the loaded Klarna widget, any valid phone number, for example, +491755555555. Enter any 6 digit number except 999999 for OTP. Using 999999 will cause the flow to fail.

Test Phone OTP in Playground with success

Test Phone OTP in Playground with failure