Last updated

Disable Session with Hosted Payment Page - API Details


This page details how to disable an HPP (Hosted Payment Page) session using the Kustom API.

Disabling an HPP Session

If a payment session needs to be canceled (e.g., offer expiration, alternative payment method used), the HPP API allows the merchant to disable the session. This is done by sending a DELETE request to the session resource URL. The session URL is provided in the create session response.

When the merchant disables the session:

  • The consumer sees an explicit error message if they try to proceed with the previously distributed link.
  • If the consumer is still on the payment page when the session is disabled, they receive a "Page Not Found" error.

The status of the HPP session changes to DISABLED. This status is permanent.

API Details

To disable an HPP session, use a DELETE request to the following URL:

https://{endpoint}/hpp/v1/sessions/{session_id}

Replace {endpoint} with your Klarna endpoint and {session_id} with the session ID from the create session response. The request doesn't require a body, and there's no body in the response.

An example cURL command:

curl -X "DELETE" https://api.klarna.com/hpp/v1/sessions/<session_id> --header "Authorization: Basic <token>"

Replace <session_id> with the actual session ID and <token> with your API token.

For a complete list of returned values, please refer to the API Reference.