Skip to content

Create session



Target audience: Developers

Create purchase session without account


This endpoint creates a klarna payments purchase session, without the need of an existing customer account. Needed for placing a klarna payments order.


This API gives access to Klarna payments related endpoints. Since this section is quite specific it has it's own section of documentation. See here for more information.


Environment URI


Identity Scope
No /external/klarna_payments/w

Curl example

curl --request POST \
  --url \
  --header 'authorization: Bearer <token>' \
  --header 'content-type: application/json' \
  --data '{
    "code": "adeprimo_digital",
    "period_type": "recurring",
    "period_id": "5f0d9ea795cfebfb8544ab12,",
    "confirmation_url": "",
    "start_date": "2021-10-30"


The request should be sent as application/json.

Parameter Description Required Format
code The code of the package or campaign e.g. adeprimo_digital Yes String
period_type limited or recurring. Always set to recurring for campaigns. Required if period_id is not set. No String
period_id Specific payment period id. Required for trial orders. Required if period_type is not set. For trial orders but not regular orders. Use payment periods API for fetching available payment periods String
confirmation_url URL to your confirmation page for the customer Yes String
start_date Start date of subscription, must be today or a future date if supplied. Format YYYY-MM-DD No Date
disable_account_info_overwrite* Prevent existing account information from being overwritten by the information received through Klarna Payments. No (default false) Boolean

Disable account information overwrite*

It is possible to disable updating existing information on the account that is purchasing using Klarna Payments. This is accomplished by using the parameter disable_account_info_overwrite. The parameter is not required and defaults to false.

The fields first_name, last_name, mobile_phone, ssn and birthdate will be updated if they are empty. The account address will only be updated if all of the following fields are empty: street, building, staircase, apartment_number, drop_box, zip_code, city, company_name, company_reference, company_department, company_crn and company_vat_number.

Please note that the account information will only be overwritten in the case of an actual purchase, and this will as such have no effect if a trial order is placed.


The response is sent as application/json.

Example of a successful response:

  "item": {
    "klarna_payments_session_id": "5aba2ca36fc93613f8000012",
    "klarna_client_token": "eyJhbGciOIJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjAwMDAwMDAwMDAtMDAwMDAtMDAwMC0wMDAwMDAwMC0wMDAwIiwidXJsIjoiaHR0cHM6Ly9jcmVkaXQtZXUua2xhcm5hLmNvbSJ9.A_rHWMSXQN2NRNGYTREBTkGwYwtm-sulkSDMvlJL87M",
    "payment_method_categories": [
            "identifier": "direct_debit",
            "name": "Bankkonto",
            "asset_urls": {
              "descriptive": "",
              "standard": ""
            "identifier": "pay_later",
            "name": "Få först. Betala sen.",
            "asset_urls": {
              "descriptive": "",
              "standard": ""

Parameter Description
klarna_payments_session_id The id of the session that you just created. This is needed when you place the order. You should store this in the user's session in your backend
klarna_client_token You need to use this token when you build the Klarna Payments Widget on your site
payment_method_categories Payment methods available for that payment session


This API uses the common error conventions of the Payway API

See common error responses