Klarna Docs - Update the Klarna Payments session

Update the Klarna Payments session

You could update the Klarna Payments session with new details, in case something in the order has been changed and the checkout reloaded. Including if the consumer adds a new item to the cart or if consumer details are updated.

Updating a session is done by making a server-side POST call to update session using the same payload structure as when creating the session in the first place.

Best Practice: For the effects of the update to be shown, you must also update the client separately through doing a new load-call.

This could also be achieved by only doing a client-side load-call, with the updated details.

POST /payments/v1/sessions/068df369-13a7-4d47-a564-62f8408bb760
Authorization: Basic pwhcueUff0MmwLShJiBE9JHA==
Content-Type: application/json

  "order_amount": 998,
  "order_tax_amount": 0,
  "order_lines": [{
      "type": "physical",
      "reference": "19-315",

This call will update the existing Klarna session, and has an empty reply when successful.

HTTP/1.1 204 No content
Content-Type: application/json

The response will be an empty object with a status.

    "correlation_id":	"6a9b1cb1-73a3-4936-a030-481ba4bb203b",
    "error_code":	"ERROR_CODE",
    "error_messages":	[

Best practice: You can use the correlation_id to troubleshoot the call in the logs app in merchant portal.

Below you will see some common error messages.

Error CodeError messageComment
BAD_VALUEBad value: order_tax_amountIf you enter any tax for orders, this is validated as described in this article. This validation is not passed in case this error message is thrown.
BAD_VALUEBad value: order_linesAll order lines are validated as seen in this article. If your added order lines do not follow our guidelines, we will throw an error referring to the specific part of an order line that has failed.
BAD_VALUEBad value: purchase_currencyIn case a purchase_currency is wrongly formatted or doesn’t apply in a certain locale this error message is thrown. If the consumer has updated country through changing billing_country this might also arise.
NOT_FOUNDInvalid session idThe session you attempted to update is not valid anymore. Or the ID is incorrectly formatted.