Skip to content

Me - Place trial order


Target audience: Developers

Place trial order

Release version: 4.7.5


This endpoint creates a klarna payments trial order. Meaning a free campaign that transitions to a standard subscription. The purchase session used to initiate the purchase must support this.

Note that this endpoint might affect the information saved on the customer's account. You can read more about this here.


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.

Klarna payments only supports the use of Direct Debit when doing 0 amount purchases. This requires you to initialize your klarna widget correctly.


Environment URI


Identity Scope
Yes /external/klarna_payments/w

Curl example

curl --request POST \
  --url \
  --header 'authorization: Bearer <token-with-identity>' \
  --header 'content-type: application/json' \
  --data '{
    "klarna_authorization_token": "klarna_authorization_token, received from klarna widget",
    "klarna_payments_session_id": "klarna_payments_session_id, received from create_session",
    "browser_ip": "",
    "browser_language": "sv-SE",
    "browser_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36",
    "traffic_source": "facebook",
    "merchant_reference": "adeprimo-campaign-001",
    "raise_on_ssn_already_taken_error": true/false
    "raise_on_ssn_already_set_error": true/false
    "raise_on_account_update_error": true/false
    "raise_on_delivery_address_error": true/false

Request parameters

The request should be sent as application/json.

Parameter Description Default value Required
klarna_authorization_token The authorization token you aquired in step 4. Yes
klarna_payments_session_id The id of the session that was returned to you in the create_session call in step 2. Yes
browser_ip The ip of the browser e.g. Yes
browser_language The browser language e.g. sv-SE Yes
browser_user_agent The user agent Yes
traffic_source The source of the purchase. E.g. facebook, web. Traffic sources need to be setup in PAP No
merchant_reference An optional customer reference, can be a code or an url. No
paywall_id The ID of the paywall.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"
raise_on_ssn_already_taken_error If set to true the request will raise an exception if the ssn is already taken by another user in Payway true No
raise_on_ssn_already_set_error If set to true the request will raise an exception if an ssn update is performed on a user with an ssn false No
raise_on_account_update_error If set to true the request will raise an exception if errors are encountered during an account update. An account update consists of "name", "birth date" and "account address" updates. false No
raise_on_delivery_address_error If set to true the request will raise an exception if errors are encountered during the order delivery address validation false No


The response is sent as application/json.


  "item": {
    "redirect_url": "",
    "pw_order_id": "ORDER-123",
    "klarna_order_id": "c8328e81-d476-4e7d-9d03-5ae228240943"

Parameter Description
redirect_url Url where you should redirect the user
pw_order_id Payway order-id
klarna_order_id Klarna order-id


This API uses the common error conventions of the Payway API

See common error responses