Download OpenAPI specification:Download
A session is referred to a shopping session initiated by a shopping at partner or sub-partner websites. The session is utilized throughout the complete shopping journey from pre-purchase, purchase and post-purchase flow by various Klarna booster products like OSM, KEC and SIWK etc. and enable interoperability between the products to provide the user a cohesive experience in all Klarna touchpoints.
Creates a shopping session.
object (SupplementaryDataBody) Pass supplementary data to Klarna that will be amended to the payment request. |
Shopping session created
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "supplementary_purchase_data": {
- "merchant_references": [
- "order-1234"
], - "content_type": "vnd.klarna.supplementary-data.v1",
- "content": {
- "acquiring_channel": "ECOMMERCE",
- "merchant_reference": "merchant-order-9876",
- "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "reference": "cart-item-1234",
- "shipping_reference": "shipping-recipient-1234"
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "phone": "844-552-7621",
- "attention": "string"
}, - "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}, - "shipping_option": {
- "shipping_type": "TO_DOOR",
- "shipping_type_attributes": [
- "SIGNATURE_REQUIRED"
], - "shipping_carrier": "DHL"
}, - "shipping_reference": "DHL-123456"
}
], - "buyer": { },
- "subscriptions": [ ],
- "ondemand": { }
}
}
}
{- "shopping_session_id": "krn:shopping:eu1:live:session:b1de90a1-1069-414c-a119-2b8e68f9e252",
- "created_at": "2024-01-01T12:00:00Z",
- "expires_at": "2024-01-01T12:00:00Z"
}
Get a shopping session.
Shopping session retrieved
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
curl -i -X GET \ 'https://api-global.klarna.com/v1/accounts/{account_id}/shopping/sessions/{shopping_session_id}' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "shopping_session_id": "krn:shopping:eu1:live:session:b1de90a1-1069-414c-a119-2b8e68f9e252",
- "created_at": "2024-01-01T12:00:00Z",
- "expires_at": "2024-01-01T12:00:00Z"
}
Update a shopping session.
object (SupplementaryDataBody) Pass supplementary data to Klarna that will be amended to the payment request. |
Shopping session updated
Bad Request, there was an error in the input of the request. The request can not be retried without modifications.
Unauthorized, the request was not authorized.
Not Found, the requested resource was not found.
Too Many Requests, the request was rate limited.
Internal Server Error, there was an unexpected error in the API.
Service Temporarily Unavailable, the system is temporarily unavailable to process the request.
{- "supplementary_purchase_data": {
- "merchant_references": [
- "order-1234"
], - "content_type": "vnd.klarna.supplementary-data.v1",
- "content": {
- "acquiring_channel": "ECOMMERCE",
- "merchant_reference": "merchant-order-9876",
- "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "reference": "cart-item-1234",
- "shipping_reference": "shipping-recipient-1234"
}
], - "shipping": [
- {
- "recipient": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "phone": "844-552-7621",
- "attention": "string"
}, - "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "OH",
- "country": "US"
}, - "shipping_option": {
- "shipping_type": "TO_DOOR",
- "shipping_type_attributes": [
- "SIGNATURE_REQUIRED"
], - "shipping_carrier": "DHL"
}, - "shipping_reference": "DHL-123456"
}
], - "buyer": { },
- "subscriptions": [ ],
- "ondemand": { }
}
}
}
{- "shopping_session_id": "krn:shopping:eu1:live:session:b1de90a1-1069-414c-a119-2b8e68f9e252",
- "created_at": "2024-01-01T12:00:00Z",
- "expires_at": "2024-01-01T12:00:00Z"
}