Get the session id
// Retrieve the id from klarna.js
const shoppingSessionId = await Klarna.Shopping.session().getShoppingSessionId()
// Provide data from server-side
PATCH https://api-global.klarna.com/v1/shopping/sessions/{shopping_session_id}
{
"supplementary_purchase_data": {
"content": {
"line_items": [{}],
"shipping": [{}],
}
}
}
Submit
Submits pre-purchase related data for a sepcific session.
A Shopping Session represents a session in which a consumer is interacting with Klarna. A session can be created by partners via backend APIs using
user_acount_token
and passed down to the script tag when loading Web SDK.A session would be also created anonymously by Web SDK if no session is provided. The session can later become authenticated by the merchant by patching the session with an account linking token.