Download OpenAPI specification:Download
Hosted Payment Page (HPP) API is a service that lets you integrate Klarna Payments without the need of hosting the web page that manages the client side of Klarna Payments. A complete HPP payment session will involve three of Klarna services:
Klarna Payments API
to start a payment session.Hosted Payment Page API
to distribute a payment session.Order Management API
to capture payment or refund consumer.Read more on Hosted payment page.
Use this API to create an HPP session after creating a payment session. Read more on Create a new HPP session.
sessionRequest
Successfully created HPP session
We were unable to create a session with the provided data. Some field constraint was violated.
Unauthorized
You were not authorized to execute this operation.
Payment session has expired.
{- "merchant_urls": {
}, - "options": {
- "background_images": [
- {
- "url": "string",
- "width": 0
}
], - "page_title": "Complete your purchase",
- "payment_method_categories": [
- "DIRECT_DEBIT"
], - "payment_method_category": "DIRECT_DEBIT",
- "place_order_mode": "PLACE_ORDER",
- "purchase_type": "BUY",
- "show_subtotal_detail": "HIDE"
}, - "payment_session_url": "One of https://api.klarna.com/payments/v1/sessions/92d97f60-7a78-46a5-8f68-c56fe52dc4af or https://api.klarna.com/checkout/v3/orders/92d97f60-7a78-46a5-8f68-c56fe52dc4af",
- "profile_id": "87ab3565-5e06-4006-9ada-8eedc6926703"
}
{- "distribution_module": {
- "generation_url": "string",
- "standalone_url": "string",
- "token": "string"
}, - "distribution_url": "https://api.klarna.com/hpp/v1/sessions/9cbc9884-1fdb-45a8-9694-9340340d0436/distribution",
- "expires_at": "2038-01-19T03:14:07.000Z",
- "manual_identification_check_url": "https://api.klarna.com/hpp/v1/sessions/9cbc9884-1fdb-45a8-9694-9340340d0436/manual-id-check",
- "session_id": "9cbc9884-1fdb-45a8-9694-9340340d0436",
}
Use this API to read an HPP session content and it's status. Read more on Read HPP session.
Session found
Unauthorized
You were not authorized to execute this operation.
HPP session has expired or could not be found by provided id.
{- "authorization_token": "70850a20-a2a0-5c70-810c-096fa6f850bb",
- "customer": {
- "date_of_birth": "1987-08-15",
- "family_name": "string",
- "given_name": "string",
- "national_identification_number": "19870815-84932",
- "title": "Mr"
}, - "expires_at": "2038-01-19T03:14:07.000Z",
- "klarna_reference": "ffc25786",
- "manual_identification": {
- "challenge": "A78",
- "customer": {
- "date_of_birth": "1987-08-15",
- "family_name": "string",
- "given_name": "string",
- "national_identification_number": "19870815-84932",
- "title": "Mr"
}, - "customer_obfuscated": {
- "date_of_birth": "1987-08-15",
- "family_name": "string",
- "given_name": "string",
- "national_identification_number": "19870815-84932",
- "title": "Mr"
}, - "expires_at": "2038-01-19T03:14:07.000Z"
}, - "order_id": "93d644a2-43f3-11e9-b210-d663bd873d93",
- "session_id": "a15b228c-02ad-11e9-8eb2-f2801f1b9fd1",
- "status": "COMPLETED",
- "updated_at": "2038-01-19T03:14:07.000Z"
}
Use this API to disable an HPP session if payment session had to be cancelled for any reason. Read more on Disable HPP session.
Session was disabled
HPP session has already been successfully completed.
Unauthorized
You were not authorized to execute this operation.
HPP session has expired or could not be found by provided id.
Use this API to distribute to the Consumer a link to the Hosted Payment Page either by e-mail or SMS after you have created an HPP session. Read more on Distribute link to the HPP Session to the Consumer.
Distribution Request parameters
Created
Successfully distributed the HPP Session
We were unable to distribute the link with the provided data. Some field constraint was violated. Or session is disabled by merchant.
Unauthorized
Forbidden
HPP session not found or access token not found
We were unable to distribute the link due to an internal error. Please try again
{- "contact_information": {
- "access_id": "klarna:09f4a78d-d096-47d4-a0f6-abcf680c70fe",
- "email": "test@example.com",
- "phone": "07000212345",
- "phone_country": "SE"
}, - "method": "sms",
- "template": "INSTORE_PURCHASE"
}