Update a Klarna Payment

Extend the Authorisation Time

The standard expiration time of a Klarna authorised payment is 28 days for a merchant - if not agreed differently between Klarna and the merchant.
The merchant can ask to extend this period for a particular Klarna payment via an API request to get more time to capture the order.

❗️

Extend the expiry time before the expiration date

The merchant has to make sure to extend the expiry time before the expiration date. If the order expires, it cannot be extended using this API.

The authorisation time of a Klarna payment can be extended by using the executePaymentAction with actionID = 344003 (ExtendAuthorizationTime).

If successful, Klarna will reset the counter of the authorisation expiration time (in days) and the merchant gets another 28 days (or the agreed default authorisation time) starting with the day of executing the action/requesting the extension.

Example:

Preconditions:

  1. Merchant has configured the default expiration time of 28 days in the Klarna system.
  2. The Klarna payment was authorised on day 0.

Scenarios:

  • Merchant sends request to extend authorisation time on day 10 --> the Klarna payment authorisation will expire on day 38.
  • Merchant sends request to extend authorisation time on day 28 --> the Klarna payment authorisation will expire on day 56.
  • Merchant sends request to extend authorisation time on day 10 and another request to extend authorisation time on day 25 --> the Klarna payment authorisation will expire on day 53 (25 + 28).
  • Merchant sends request to extend authorisation time on day 20 and another request to extend authorisation time on day 50 --> Klarna will refuse the request because the authorisation expired already on day 48.
  • Merchant sends request to extend authorisation time on day 28 and another request to extend authorisation time on day 50 and another request to extend authorisation time on day 76 --> the Klarna payment authorisation will expire on day 104 (76 + 28).

📘

Maximum allowed total authorisation time

The authorisation time can be extended to a maximum of 180 days (by sending several requests).

Example executePaymentAction request to extend the authorisation time of a Klarna payment:

<executePaymentActionRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.cqrpayments.com/PaymentProcessing">
   <merchantID>KalixaAcceptDEMO</merchantID>
   <shopID>KalixaAcceptDEMO</shopID>
   <paymentID>6f27d64e-8ca7-447b-a683-b407355f5735</paymentID>
   <actionID>344003</actionID>
   <actionData>
   </actionData>
</executePaymentActionRequest>

Example executePaymentAction response (success case): statusCode = 0

<executePaymentActionResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <statusCode>0</statusCode>
    <actionResults>
        <result xsi:type="keyStringValuePair">
            <key>lastStateDefinition</key>
            <value>142</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderTransactionID</key>
            <value>c3aa99b5-8df6-244c-9b75-69ee10593274</value>
        </result>
        <result xsi:type="keyDateTimeValuePair">
            <key>LastExpirationResetDate</key>
            <value>2020-09-02T14:47:14.9809806Z</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>LastExpirationResetResult</key>
            <value>Payment expiration was reset</value>
        </result>
    </actionResults>
</executePaymentActionResponse>

Example executePaymentAction response (refused case): statusCode = 1 (to be implemented still!)

<executePaymentActionResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <statusCode>0</statusCode>
    <actionResults>
        <result xsi:type="keyStringValuePair">
            <key>lastStateDefinition</key>
            <value>142</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderTransactionID</key>
            <value>c3aa99b5-8df6-244c-9b75-69ee10593274</value>
        </result>
        <result xsi:type="keyDateTimeValuePair">
            <key>LastExpirationResetDate</key>
            <value>2020-09-02T14:47:14.9809806Z</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>LastExpirationResetResult</key>
            <value>Payment expiration reset refused: NOT_ALLOWED "Order 1F118984-E067-421D-BB1E-985FB024B23C cannot be extended."</value>
        </result>
    </actionResults>
</executePaymentActionResponse>

Example executePaymentAction response (unsuccessful case because of a communication error with the provider Klarna): statusCode = 1

<executePaymentActionResponse xmlns="http://www.cqrpayments.com/PaymentProcessing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <statusCode>0</statusCode>
    <actionResults>
        <result xsi:type="keyStringValuePair">
            <key>lastStateDefinition</key>
            <value>142</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>ProviderTransactionID</key>
            <value>c3aa99b5-8df6-244c-9b75-69ee10593274</value>
        </result>
        <result xsi:type="keyDateTimeValuePair">
            <key>LastExpirationResetDate</key>
            <value>2020-09-02T14:47:14.9809806Z</value>
        </result>
        <result xsi:type="keyStringValuePair">
            <key>LastExpirationResetResult</key>
            <value>Payment expiration reset error: Communication error</value>
        </result>
    </actionResults>
</executePaymentActionResponse>

How to test Extend the Authorisation Time

Update Merchant Reference

❗️

Not yet supported

This feature is not yet supported. Please contact your Account Manager if you require this to be made available for you.

The payment.Description which should contain the merchant's internal order number or other reference is used by Klarna and will be shown on the Klarna confirmation page as "order number" and sent to the customer in the confirmation mail after a successful direct bank transfer payment. It will also be included in the payments description in the customer's bank account (max 255 characters) when Klarna deducts the money.

If a merchant is not able to provide the order number already in the first request for a new Klarna payment (getRedirectData or initiatePayment) it can be updated later on with this method: tbd