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 Provide supporting details for a payment request. This will be acompanied by the payment request made to the acquiring partner. |
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.
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.
{- "payment_request": {
- "supplementary_purchase_data": {
- "purchase_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",
- "line_item_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": "US-OH",
- "country": "US"
}, - "shipping_option": {
- "shipping_type": "TO_DOOR",
- "shipping_type_attributes": [
- "SIGNATURE_REQUIRED"
], - "shipping_carrier": "DHL"
}, - "shipping_reference": "DHL-123456"
}
], - "customer": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "phone": "844-552-7621",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "customer_accounts": [
- {
- "account_identifier": "acc_stripe_1234",
- "account_provider_url": "string",
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "email_last_verified_at": "2024-01-01T12:00:00Z",
- "phone": "844-552-7621",
- "phone_last_verified_at": "2024-01-01T12:00:00Z",
- "loyalty_level": "LOW",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T12:00:00Z",
- "last_login": {
- "occurred_at": "2024-01-01T12:00:00Z",
- "login_method": "SMS_BY_OTP"
}, - "purchase_history": [
- {
- "number_of_purchases": null,
- "number_of_paid_purchases": null,
- "number_of_disputed_purchases": null,
- "total_amount": null,
- "currency": null,
- "payment_method": null,
- "first_purchase_at": null,
- "last_purchase_at": null
}
]
}
], - "customer_device": {
- "app_identifier": "com.example.merchant",
- "device_identifier": "Operating System: Windows 10 Browser: Chrome 91.0.4430.212 Screen Resolution: 1920x1080 Installed Plugins: Adobe Flash Player 32.0.0.465, Java 8 Update 291 Timezone: UTC+02:00 Language: English (United States)",
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
- "ip_address": "192.168.1.1",
- "geolocation": {
- "country": "US",
- "latitude": 40.7128,
- "longitude": 74.006
}
}
}, - "travel_reservations": [
- {
- "travel_type": "AIR",
- "reservation_reference": "string",
- "departure": {
- "departure_airport": "ARN",
- "departs_at": "2024-01-01T12:00:00Z",
- "city": "Columbus",
- "country": "US"
}, - "arrival": {
- "arrival_airport": "OSL",
- "city": "Columbus",
- "country": "US"
}, - "carrier_name": "IB",
- "price": 20000,
- "currency": "USD",
- "ticket_class": "ECONOMY",
- "passengers": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "lodging_reservations": [
- {
- "lodging_name": "Any Hotel",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "number_of_spaces": 1,
- "price": 20000,
- "currency": "USD",
- "lodging_type": "ROOM",
- "guests": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "host": {
- "host_reference": "string",
- "host_type": "RENTAL_AGENCY",
- "country_of_domicile": "US",
- "registered_at": "2024-01-01T12:00:00Z",
- "number_of_reservations": 2147483647
}, - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "subscriptions": [
- {
- "subscription_reference": "string",
- "name": "string",
- "subscription_plan": {
- "billing_amount": 2147483647,
- "interval": "MONTH",
- "interval_frequency": 1,
- "next_billing_date": "1970-01-01",
- "next_billing_amount": 0
}, - "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "line_item_reference": "cart-item-1234",
- "shipping_reference": "shipping-recipient-1234"
}
]
}
], - "ondemand_service": {
- "average_amount": 2000,
- "minimum_amount": 2000,
- "maximum_amount": 2000,
- "purchase_interval": "MONTH",
- "purchase_interval_frequency": 1
}, - "event_reservations": [
- {
- "event_name": "Magical concert",
- "event_company_name": "Las Vegas Events",
- "event_type": "CONCERT",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "venue_name": "Las Vegas Sphere",
- "access_controlled_venue": true,
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "affiliate_name": "string",
- "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
]
}
], - "vouchers": [
- {
- "voucher_name": "Gift Card",
- "voucher_type": "GIFT_CARD",
- "voucher_company": "Gift card company",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "affiliate_name": "string"
}
]
}
}
}
{- "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.
{- "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 Provide supporting details for a payment request. This will be acompanied by the payment request made to the acquiring partner. |
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.
{- "payment_request": {
- "supplementary_purchase_data": {
- "purchase_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",
- "line_item_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": "US-OH",
- "country": "US"
}, - "shipping_option": {
- "shipping_type": "TO_DOOR",
- "shipping_type_attributes": [
- "SIGNATURE_REQUIRED"
], - "shipping_carrier": "DHL"
}, - "shipping_reference": "DHL-123456"
}
], - "customer": {
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "phone": "844-552-7621",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "customer_accounts": [
- {
- "account_identifier": "acc_stripe_1234",
- "account_provider_url": "string",
- "given_name": "John",
- "family_name": "Doe",
- "email": "john.doe@klarna.com",
- "email_last_verified_at": "2024-01-01T12:00:00Z",
- "phone": "844-552-7621",
- "phone_last_verified_at": "2024-01-01T12:00:00Z",
- "loyalty_level": "LOW",
- "created_at": "2024-01-01T12:00:00Z",
- "updated_at": "2024-01-01T12:00:00Z",
- "last_login": {
- "occurred_at": "2024-01-01T12:00:00Z",
- "login_method": "SMS_BY_OTP"
}, - "purchase_history": [
- {
- "number_of_purchases": null,
- "number_of_paid_purchases": null,
- "number_of_disputed_purchases": null,
- "total_amount": null,
- "currency": null,
- "payment_method": null,
- "first_purchase_at": null,
- "last_purchase_at": null
}
]
}
], - "customer_device": {
- "app_identifier": "com.example.merchant",
- "device_identifier": "Operating System: Windows 10 Browser: Chrome 91.0.4430.212 Screen Resolution: 1920x1080 Installed Plugins: Adobe Flash Player 32.0.0.465, Java 8 Update 291 Timezone: UTC+02:00 Language: English (United States)",
- "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
- "ip_address": "192.168.1.1",
- "geolocation": {
- "country": "US",
- "latitude": 40.7128,
- "longitude": 74.006
}
}
}, - "travel_reservations": [
- {
- "travel_type": "AIR",
- "reservation_reference": "string",
- "departure": {
- "departure_airport": "ARN",
- "departs_at": "2024-01-01T12:00:00Z",
- "city": "Columbus",
- "country": "US"
}, - "arrival": {
- "arrival_airport": "OSL",
- "city": "Columbus",
- "country": "US"
}, - "carrier_name": "IB",
- "price": 20000,
- "currency": "USD",
- "ticket_class": "ECONOMY",
- "passengers": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "lodging_reservations": [
- {
- "lodging_name": "Any Hotel",
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "number_of_spaces": 1,
- "price": 20000,
- "currency": "USD",
- "lodging_type": "ROOM",
- "guests": [
- {
- "given_name": "John",
- "family_name": "Doe"
}
], - "host": {
- "host_reference": "string",
- "host_type": "RENTAL_AGENCY",
- "country_of_domicile": "US",
- "registered_at": "2024-01-01T12:00:00Z",
- "number_of_reservations": 2147483647
}, - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "affiliate_name": "string"
}
], - "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
], - "subscriptions": [
- {
- "subscription_reference": "string",
- "name": "string",
- "subscription_plan": {
- "billing_amount": 2147483647,
- "interval": "MONTH",
- "interval_frequency": 1,
- "next_billing_date": "1970-01-01",
- "next_billing_amount": 0
}, - "line_items": [
- {
- "name": "Black fountain pen",
- "quantity": 2,
- "total_amount": 2000,
- "total_tax_amount": 0,
- "unit_price": 1000,
- "product_identifier": "3270220049012",
- "line_item_reference": "cart-item-1234",
- "shipping_reference": "shipping-recipient-1234"
}
]
}
], - "ondemand_service": {
- "average_amount": 2000,
- "minimum_amount": 2000,
- "maximum_amount": 2000,
- "purchase_interval": "MONTH",
- "purchase_interval_frequency": 1
}, - "event_reservations": [
- {
- "event_name": "Magical concert",
- "event_company_name": "Las Vegas Events",
- "event_type": "CONCERT",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "venue_name": "Las Vegas Sphere",
- "access_controlled_venue": true,
- "address": {
- "street_address": "800 N. High St",
- "street_address2": "Ste. 400",
- "postal_code": "43215",
- "city": "Columbus",
- "region": "US-OH",
- "country": "US"
}, - "affiliate_name": "string",
- "insurances": [
- {
- "insurance_type": "CANCELATION",
- "insurance_company_name": "string",
- "price": 20000,
- "currency": "USD"
}
]
}
], - "vouchers": [
- {
- "voucher_name": "Gift Card",
- "voucher_type": "GIFT_CARD",
- "voucher_company": "Gift card company",
- "starts_at": "2024-01-01T12:00:00Z",
- "ends_at": "2024-01-01T12:00:00Z",
- "affiliate_name": "string"
}
]
}
}
}
{- "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 an interoperability token that should be passed to the Acquiring Partner to enable continuity of the customer journey.
Interoperability token 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.
{- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaG9wcGluZ19zZXNzaW9uX2lkIjoia3JuOnNob3BwaW5nOmV1MTpzZXNzaW9uOjBlOTIyN2MwLTBjNDAtNDdkZi04YzEwLTQwMTRmYzFiZDJiZCIsInN0YXR1cyI6IlBBWU1FTlRfUFJFUEFSRUQiLCJ2ZXJzaW9uIjoxLCJjcmVhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoiLCJ1cGRhdGVkX2F0IjoiMjAyNC0wMS0wMVQxMjowMDowMFoifQ.1y87kuEKnETy_UCHbTMXx1p4mViZE816okcVmfHFZoo"
}