Klarna Test Cases
Introduction
Pre-requisites
Before you can start testing the Klarna payment method it must be activated for your merchant/shop. Contact your account manager or the Support team to request this configuration.
A valid request for a Klarna Deposit needs to contain the following details:
- Send correct country and currency combination Country and Currency supported
- Send the proper customer and billing information that can be found here Customer and Billing Information
- Send the correct shopping card information that can be found here Shopping Cart/Basket information
Test Cases
Klarna Deposit
Klarna Deposit in Checkout
Detailed information for integrating Klarna Deposit via PXP Financial Checkout can be found in the Klarna Deposit Redirect Integration documentation.
Sample test data for different markets can also be found in the Klarna Provider documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KDCO1 | Initiate a successful Klarna Deposit |
|
|
KDCO2 | Complete a successful Klarna Pay Later Deposit |
|
|
KDCO3 | Complete a successful Klarna Pay Now Deposit |
Note: |
|
KDCO4 | Complete a successful Klarna Financing Deposit |
|
|
KDCO5 | Unsuccessful initiation of a Klarna Deposit due to an error received from provider Klarna |
|
|
KDCO6 | Unsuccessful initiation of a Klarna Deposit due to no payment option received from provider Klarna |
|
|
KDCO7 | A Klarna order has been denied by provider |
|
|
KDCO8 | Option not available |
|
|
KDCO9 | Display of the Date of Birth popup widget |
|
|
KDCO10 | Display of the National Identification Number popup widget |
|
|
Klarna Deposit in Backend2Backend
Detailed information for integrating Klarna Deposit via Backend2Backend can be found in the Klarna Deposit Backend2Backend Integration documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KDB2B1 | Successful Klarna deposit |
| A Klarna Deposit payment is created and is in the state "ExecutedByProvider" Note: Based on the selection in the Klarna widget it will be one of the following payment methods: Klarna Pay Now Deposit (370), Klarna Pay Later Deposit (371) or Klarna Financing Deposit (372) |
KDB2B2 | Unsuccessful Klarna deposit due to missing mandatory data |
| A Klarna Deposit payment is created, but is not in the state ExecutedByProvider |
Klarna Capture
Detailed information for integrating Klarna Captures can be found in the Capture a Klarna Payment documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KCAP1 | Successful full Klarna capture |
| A Klarna capture payment is created and is in the state "PendingToBeCaptured". The original Klarna deposit payment remains in state "ExecutedByProvider". |
KCAP2 | Successful partial Klarna capture |
| A Klarna capture payment is created and is in the state "PendingToBeCaptured" . The original Klarna deposit payment remains in state "ExecutedByProvider". |
KCAP3 | Successful partial Klarna captures resulting in a full capture |
| 2 Klarna capture payments are created and the state is "PendingToBeCaptured". The original Klarna deposit payment remains in state "ExecutedByProvider". |
KCAP4 | Unsuccessful Klarna capture due to too high capture amount |
| The capture payment is not created. An error with errorCode "100" and errorMessage "The capture amount 11.00 EUR must be less or equal to the remaining capturable amount: 10.0000 EUR" is displayed. The original Klarna deposit payment remains in state "ExecutedByProvider". |
KCAP5 | Unsuccessful Klarna capture due to wrong currency |
| The capture payment is not created. An error with errorCode "100" and errorMessage "The currency GBP of the capture payment must be equal to the currency EUR of the Klarna Deposit Payment" is displayed. The original Klarna deposit payment remains in state "ExecutedByProvider". |
Klarna Refund
Detailed information for integrating Klarna Refunds can be found in the Refund a Klarna Payment documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KREF1 | Successful full refund of a full captured payment |
| The Klarna refund payment is in the state "Refunded". |
KREF2 | Successful partial refund of a full captured payment |
| The Klarna refund payment is in the state "Refunded". |
KREF3 | Successful partial refund of a partial captured payment |
| The Klarna refund payment is in the state "Refunded". |
KREF4 | Successful partial Klarna refunds resulting in a full refund |
| 2 Klarna refund payments are created and are in the state "Refunded". |
KREF5 | Successful partial Klarna refunds with 2 captures |
| 2 Klarna refund payments are created and are in the state "Refunded". |
KREF6 | Unsuccessful Klarna refund due to invalid amount |
| The refund payment is not created. An error with errorCode "1002" and errorMessage "Refund amount exceeded! Deposit amount = 10.0000; Refunded amount = 0; Max refundable amount = 9.0000, Refund amount = 10.00" is displayed. |
KREF7 | Unsuccessful Klarna refund due to wrong currency |
| The refund payment is not created. An error with errorCode "309" and errorMessage "Currencies do not match! Currency of amount = EUR, but expected currency = GBP" is displayed. |
Klarna Cancel
Detailed information for integrating Klarna Cancellation can be found in the Cancel/Revert a Klarna Payment documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KCAN1 | Successful full cancellation of a Klarna deposit |
| A Klarna cancellation payment is created and is in the state "Cancelled". Note: |
KCAN2 | Successful partial cancellation of a Klarna deposit |
| A Klarna cancellation payment with amount 6 € is created and is in the state "Cancelled". |
KCAN3 | Unsuccessful cancellation of a Klarna deposit if fully captured payment is done |
| The cancellation payment is not created. An error with errorCode "100" and errorMessage "There is no authorized amount left to cancel." is displayed. |
KCAN4 | Unsuccessful cancellation of a Klarna deposit that was already fully cancelled |
| For step 2: A Klarna cancellation payment is created and is in the state "Cancelled". |
Update a Klarna Payment
Extend Authorisation Time for a Klarna Deposit
Detailed information for integrating Extending the Authorisation Time can be found in the Extend Authorisation time documentation.
# | Test Case Name | Steps to Execute | Expected Outcome |
---|---|---|---|
KEAT1 | Successful extension of Authorisation Time for a Klarna Deposit |
| The Klarna deposit payment Authorisation time is increased with + 28 days. The Klarna deposit payment in PS admin has the detail "LastExpirationResetResult". |
KEAT2 | Successful extension of Authorisation Time for a partially captured Klarna Deposit |
| The Klarna deposit payment Authorisation time is increased with + 28 days. The Klarna deposit payment in PS admin has the detail "LastExpirationResetResult". |
KEAT3 | Unsuccesful extension of Authorisation Time for a fully cancelled Klarna Deposit |
| The Klarna deposit payment Authorisation time is not increased with + 28 days. Note: Order with ID will be different for every payment |
FAQs
How to move a Klarna capture payment from "PendingToBeCaptured" to "CapturedByProvider"
Precondition for testing RefundsMoving a Klarna capture payment from "PendingToBeCaptured" to "CapturedByProvider" needs to be done before a Klarna payment can be refunded. Refunds can only be created if a Klarna deposit was successfully captured (=has at least one Capture Payment in state "CapturedByProvider")
- Create a successful Klarna deposit payment over 10 €
- Create a corresponding successful Klarna capture payment with amount of 10 €, the Klarna capture payment is in the state "PendingToBeCaptured"
- Log in to the PS admin and open the Klarna capture payment from step 2
- If you have sufficient rights you will see in the action area the value "CapturePayment" (See screenshot 1)
- Select action "CapturePayment" and click "ExecuteAction"
Expected result: The Klarna capture payment is in the state "CapturedByProvider"

Screenshot 1: CapturePayment action
How to cancel a Klarna payment in the PXP Financial Admin Tool
Full cancellation
- Create a successful Klarna deposit payment over 10 €
- Log in to the PS admin and open the Klarna deposit from step 1
- If you have sufficient rights you will see in the action area the value "Cancel" (See screenshot 1)
- Select action "CancelPayment" with a reason and click "ExecuteAction"
Expected result: A Klarna cancellation payment with amount of 10 € is created and is in the state cancelled
Partial cancellation
- Create a successful Klarna deposit payment over 10 €
- Create a successful Klarna capture payment over 4 € and make sure that the capture payment is in the state "CapturedByProvider"
- Log in to the PS admin and open the _Klarna deposit_payment from step 1
- Select action "CancelPayment" with a reason and click "ExecuteAction"
Expected result: A Klarna cancellation payment with amount of 6 € is created and is in the state cancelled

Screenshot 2: CancelPayment action
How to extend the authorisation time of a Klarna payment in the PXP Financial Admin Tool
- Create a successful Klarna deposit payment
- Log in to the PS admin and open the Klarna deposit payment
- If you have sufficient rights you will see in the action area the value "ResetPaymentExpirationDate" (see screenshot 1
- Select action "ResetPaymentExpirationDate and click "ExecuteAction"
Expected result: The Klarna deposit payment Authorisation time is increased with + 28 days. The Klarna deposit payment in PS admin has the detail "LastExpirationResetResult". (see screenshot 2)

Screenshot 3: ResetPaymentExpirationDate Action area

Screenshot 4: LastExpirationResetResult and LastExpirationResetDate details
Updated about 1 month ago