Read the Klarna Payments Session

You can read the Klarna Payments session at any time after it has been created, to get information about it.

Date: 11.07.2019

If you want to get information about the details of a specific session, you can do this by reading the session. This will return all data that has been collected during the session. Reading a session is done by making a server-side GET call to read session.

NOTE: We will only display consumer details after the session has been authorized.

Request

1
2
3
4
5
Path: GET /payments/v1/sessions/{session_id}

Headers:
Content-Type: application/json
Empty body request

Responses

Successful response example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Description:
successful operation

Headers:
Status Code: 200
Content-Type: application/json

{
    "billing_address": {
        "attention": "string",
        "city": "Beverly Hills",
        "country": "US",
        "email": "john@doe.com",
        "family_name": "Doe",
        "given_name": "John",
        "organization_name": "string",
        "phone": "333444555",
        "postal_code": "90210",
        "region": "CA",
        "street_address": "Lombard St 10",
        "street_address2": "Apt 214",
        "title": "Mr"
    },
    "client_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJzZXNzaW9uX2lkIiA6ICIw",
    "customer": {
        "date_of_birth": "string",
        "gender": "string",
        "last_four_ssn": "string",
        "national_identification_number": "string",
        "organization_entity_type": "LIMITED_COMPANY",
        "organization_registration_id": "string",
        "title": "string",
        "type": "string",
        "vat_id": "string"
    },
    "expires_at": "2038-01-19T03:14:07.000Z",
    "locale": "en-US",
    "merchant_urls": {
        "confirmation": "string",
        "notification": "string",
        "push": "string"
    },
    "order_amount": 0,
    "order_lines": [
        {
            "image_url": "https://www.exampleobjects.com/logo.png",
            "merchant_data": "{\"marketplace_seller_info\":[{\"product_category\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}",
            "name": "Battery Power Pack",
            "product_identifiers": {
                "brand": "Intel",
                "category_path": "Electronics Store > Computers & Tablets > Desktops",
                "global_trade_item_number": "735858293167",
                "manufacturer_part_number": "BOXNUC5CPYH"
            },
            "product_url": "https://www.estore.com/products/f2a8d7e34",
            "quantity": 0,
            "quantity_unit": "kg",
            "reference": "19-402-USA",
            "tax_rate": 0,
            "total_amount": 0,
            "total_discount_amount": 0,
            "total_tax_amount": 0,
            "type": "physical",
            "unit_price": 0
        }
    ],
    "order_tax_amount": 0,
    "payment_method_categories": [
        {
            "asset_urls": {
                "descriptive": "https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_later/descriptive/pink.svg",
                "standard": "https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_later/standard/pink.svg"
            },
            "identifier": "pay_later",
            "name": "Pay Later"
        }
    ],
    "purchase_country": "US",
    "purchase_currency": "USD",
    "shipping_address": {
        "attention": "string",
        "city": "Beverly Hills",
        "country": "US",
        "email": "john@doe.com",
        "family_name": "Doe",
        "given_name": "John",
        "organization_name": "string",
        "phone": "333444555",
        "postal_code": "90210",
        "region": "CA",
        "street_address": "Lombard St 10",
        "street_address2": "Apt 214",
        "title": "Mr"
    },
    "status": "complete"
}

Example error response

1
2
3
4
5
6
7
{
    "correlation_id": "6a9b1cb1-73a3-4936-a030-481ba4bb203b",
    "error_code": "ERROR_CODE",
    "error_messages": [
        "ERROR_MESSAGE"
    ]
}

Best practice: You can use the correlation_id to troubleshoot the call in the logs app in merchant portal.

Example error responses

Error CodeError messageComment
Error Code
NOT_FOUND
Error message
Invalid session id
Comment
The session you attempted to update is not valid anymore. Or the ID is incorrectly formatted.