Klarna API request timeout behavior for Direct Partners: default idle timeouts, the structured timeout error response, and recommendations for retrying timed-out requests safely.
1 min read
Request Timeout
To improve integration resilience, it is a best practice to configure explicit timeouts for all API requests made to Klarna APIs.
Klarna API timeout behavior
All Klarna APIs enforce an idle timeout, a limit on how long a connection can remain open without returning data.
Default idle timeout: 59 seconds
Some API operations define shorter timeouts, which are specified in their individual API operation documentation.
Note: An API request may take longer than 59 seconds if the connection remains active and data continues to be transferred. This situation is rare and should not be relied upon for typical operation.
Error response for timeout
If the timeout is reached before a response is returned, Klarna's API responds with HTTP status code 500 and a structured error object indicating a timeout condition: