Refund a Klarna Payment

To initiate a refund for a Klarna payment, the initiatePaymentFromReference API call must be used.

Klarna (Partial) Refund requests are only applicable for the following payment methods:

  • Klarna Pay Now (370)
  • Klarna Pay Later (371)
  • Klarna Financing (372)


Capture payments must be in state CapturedByProvider

Refunds can only be done for Klarna payments which were already captured with provider Klarna (Capture payments must be in state CapturedByProvider).
For testing purposes, Klarna Capture payments can be manually moved from state PendingToBeCaptured to CapturedByProvider using the PXP Financial Admin Tool. Instructions how to manipulate a Klarna capture payment for testing purposes using the PXP Admin tool can be found here: Capture Testing FAQs

The paymentID of the original Klarna payment (received in the initiatePaymentResponse for initiating a new Klarna payment) must be used as originalPaymentID in the initiatePaymentFromReferenceRequest for creating the refund.

The merchant can decide to refund the full or a partial amount - but it must sum up to the total captured amount of the Klarna payment.

To trigger a refund for a Klarna payment, an intiatePaymentFromReference request using paymentMethodID = 376 ("Klarna Refund") has to be sent.

376Klarna Refund

The following table contains the fields which have to/can be sent in the initiatePaymentFromReference :

Field (value type, required)Description
(positiveMoney, required)
The amount of the refund must be lower than or equal to the total captured amount of the original Klarna Deposit payment and above 0. In case of partial refunds it must be lower than or equal to the total captured amount minus previous successful refunds.
(string, optional)
Description of the refund shown to the customer by Klarna.
Maximum 255 characters.
(positiveInt,, required)
Should contain value 376 for the "Klarna Refund" payment method.
(string, required)
Merchant’s transaction ID (order ID, purchase ID, sale ID ...). This ID will be shown as "PaymentID" in the merchants settlement report generated by PXP Financial and can be used for mapping/reconciliation purpose in the merchant system if applicable.
This ID must be unique per payment to allow for idempotency. If a merchant requires/wants to to send the same merchantTransactionID for refunds of a Klarna Deposit, please contact the PXP Financial Account Developer.
(guid, required)
The paymentD of the original Klarna Deposit payment (received in the initiatePaymentResponse for initiating a new Klarna payment) must be used as originalPaymentID in the initiatePaymentFromReferenceRequest for creating the refund payment.
(shoppingCart, optional)
List of returned items relevant for this refund.
It is possible and recommended by Klarna to transmit the items which are covered with this refund request to reduce customer service contacts.

Details how to structure the ShoppingCart can be found on the Klarna Deposit page.


Remaining authorised amount

The remaining authorisation amount which could be captured still does not increase because of a refund.

Example initiatePaymentfromReference for refunding a Klarna Deposit with a partial amount, including the optional ShoppingCart element

<?xml version="1.0" encoding="utf-8"?>
<initiatePaymentFromReferenceRequest xmlns="" xmlns:xsi="" xmlns:xsd="http<initiatePaymentFromReferenceRequest 
    <amount currencyCode="sek">110.00
        <data xsi:type="keyStringValuePair">
            <value>Your reason for refund</value>
                        <taxAmount rate="20" name="VAT">5.00</taxAmount>
                    <taxAmount rate="20" name="VAT">2.5</taxAmount>
                    <taxAmount rate="20" name="VAT">-2.50</taxAmount>
                    <description>Flowers Design</description>
                        <taxAmount rate="10" name="VAT">3.64</taxAmount>
                    <taxAmount rate="10" name="VAT">6.82</taxAmount>
                    <taxAmount rate="10" name="VAT">-0.45</taxAmount>
            <taxAmount rate="20" name="VAT">5</taxAmount>
                <name>Sommer Sales-Discount</name>
                <taxAmount rate="20" name="VAT">-1.67</taxAmount>
            <amountByTax taxName="VAT" taxRate="10">
            <amountByTax taxName="VAT" taxRate="20">

The Klarna payment for which the initiatePaymentFromReference request was sent will remain in state ExecutedByProvider (142). A new payment which is linked to the original Klarna payment will be created.

IDNameSuccessful State
376Klarna RefundRefunded (125)

The response for the initiatePaymentFromReference request will contain all relevant data about the new payment which was created for the refund.

Example initiatePaymentFromReference response for refunding a Klarna payment (partially):

<?xml version="1.0" encoding="utf-8"?>
	<payment xsi:type="paymentWithPaymentAccount">
		<amount currencyCode="GBP">30</amount>
			<paymentStateDetails xsi:nil="true"/>
		<baseAmount currencyCode="EUR">37.89</baseAmount>
          <detail xsi:type="keyIntValuePair">

Payment State Flow for all Klarna Partial Refund payments:



If a refund cannot be done due to invalid data (e.g. unknown originalPaymentID) the following error codes are returned:

Error CodeReasonDescription
504Missing fieldNot all required fields necessary for specific payment method have been sent.
e.g. amount or PaymentDescription (mandatory for refunds)
1002Invalid refund amountThere are 2 possible reasons for this error:
The amount of the refund is higher than the amount of the original payment
The amount of the refund is higher than the allowed refundable amount (calculated as [original payment amount] - sum [all partial refunds])
1003Original payment is refundable / not in a refundable stateRefund not possible
1004Invalid payment methodThe specified refund payment method ID is not allowed for the original deposit’s payment method.


Generic Error Codes

Find here more information about Error Handling and generic error codes.

Refunds and Partial Captures (Split Shipment)

It is possible to create refunds for Klarna payments with specific amounts directly on the original Klarna Deposit payment - and not for each partial capture separately.

Example : Refunding Multiple partial captures

  • merchant makes a Klarna Deposit for 100 EUR
  • merchant executes 1st partial capture for 50 EUR
  • merchant executes 2nd partial capture for 20 EUR
  • merchant executes 3rd partial capture for 10 EUR
  • merchant sends cancel request to revert the remaining 20 EUR (they cannot be captured anymore)

If the merchant wants to refund for example 55 EUR he simply has to initiate one refund referencing the PaymentID of the original Klarna Deposit.
If more refunds are necessary later, another refund request, e.g. with 25 EUR can be initiated.
In total, 55 + 25 = 80 EUR were refunded now and no further refund would be possible because the total captured amount is 50 + 20 + 10 = 80 EUR.

How to test Klarna Refunds