Klarna Docs - Test scenarios.

Test scenarios.

In this section, you can find different scenarios for Klarna’s payment and checkout flows.

If you want to learn more about testing Klarna products using the API, see the How to test section.

The following payment methods are available for both Payments and Checkout.

To test the direct debit payment flow from a customer's perspective, use an IBAN-format number. For example, the following sample IBAN number will work for a test store in Germany: DE1152 0513 7351 2071 0131

In Sweden, use the following sample Personal number: 19770111-6050.

To test the card payment flow from a customer's perspective, use the following card details in the loaded Klarna widget:

  • Credit Number: 4111 1111 1111 1111
  • CVC: 123
  • Expiration date: 12/28 or any other future date in MM/YY format
  • Card number to trigger a 3-D Secure flow: 4687388888888881

Card payment UI flow

Card payment UI flow

To test a direct bank transfer payment flow from a customer's perspective, look for Demo Bank in the loaded Klarna widget.

 Bank transfer payment UI flow

Bank transfer payment UI flow

To launch a payment widget, include a sample email address in your API call. You can modify the address to display the sign-up widget or delay payment.

In the examples below, the email address reflects sample US user data. Make sure to adjust the address to match the country in which your store operates.

The following table lists sample email addresses for a successful payment scenario.

Desired behaviorEmail address patternSample email address
New customer sign upusername+require_signup@domain.comcustomer+require_signup@email.us
Returning customerusername@domain.comcustomer@email.us

The following table lists sample email addresses for alternative payment scenarios.

Desired behaviorEmail address patternSample email address
Show form: False (only when pre-screen is enabled)username+red@domain.comcustomer+red@email.us
Approved: Falseusername+denied@domain.comcustomer+denied@email.us
Pending {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.username+pend-{status}-{time delay}@domain.comcustomer+pend-accept-05@email.us

To launch a checkout widget, include a sample email address in your API call.

In the examples below, the email address reflects sample US user data. Make sure to adjust the address to match the country in which your store operates.

The following table lists sample email addresses for a successful checkout scenario.

Desired behaviorConsumer email address pattern
Accept flowusername@domain.com

The following table lists sample email addresses for alternative checkout scenarios.

Expected behaviorCustomer email address patternExample
Only present pre-paid optionsexample-email**+red**@example.comcustomer+red@email.us

To test an approval response for Swish, you need to add a specific suffix to the email address you provide.

Desired behaviorConsumer email address patternExample
Successful Swish purchaseusername+success@domain.comcustomer+success@email.us

To test a rejection response for Swish, you need to add a specific suffix to the email address you provide.

Expected behaviorCustomer email address patternExample
Rejected purchaseemail+rejected@domain.comcustomer+rejected@email.us