klarna
Update a Klarna payment session
Refreshes an existing Klarna session (identified by session_id in the
body) against the cart’s current line items and totals. Cart-token
authenticated. Returns 400 when Klarna rejects the update, 404 when the
cart is not found, 410 when the cart has already been processed or holds an authorized enrollment, and 422
for invalid parameters.
PATCH
/
api
/
payments
/
v2026-04
/
carts
/
{cart_token}
/
klarna
/
sessions
Update a Klarna payment session
curl --request PATCH \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "klarna_sess_9f8e7d6c"
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions"
payload = { "session_id": "klarna_sess_9f8e7d6c" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'klarna_sess_9f8e7d6c'})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'klarna_sess_9f8e7d6c'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions"
payload := strings.NewReader("{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"meta": {
"request_id": "018f2c1a-8b3a-7e6d-9f10-2a3b4c5d6e7f",
"timestamp": "2026-04-01T12:00:00Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": {}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Path Parameters
Opaque cart token returned by the create-cart response. It scopes the request to a single cart and is the credential for these endpoints — cart-token authentication carried in the path, with no bearer token or API key.
Body
application/json
⌘I
Update a Klarna payment session
curl --request PATCH \
--url https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "klarna_sess_9f8e7d6c"
}
'import requests
url = "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions"
payload = { "session_id": "klarna_sess_9f8e7d6c" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({session_id: 'klarna_sess_9f8e7d6c'})
};
fetch('https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => 'klarna_sess_9f8e7d6c'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions"
payload := strings.NewReader("{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/payments/v2026-04/carts/{cart_token}/klarna/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"klarna_sess_9f8e7d6c\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"meta": {
"request_id": "018f2c1a-8b3a-7e6d-9f10-2a3b4c5d6e7f",
"timestamp": "2026-04-01T12:00:00Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"shop_url": "<string>",
"cart": {}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}