4

I am a beginner with Klarna and am trying to get started.

Using Postman, I am trying to create a Session by doing a POST to https://api-na.playground.klarna.com/payments/v1/sessions. I am using HTTP Basic Auth.

Below is a Request & Response. Can you help me figure out what I am doing wrong.

Request Headers:

Accept: */*
Klarna-Correlation-Id: 45021dd4-b216-417a-a8e7-85f2447a936d
User-Agent: PostmanRuntime/7.4.0
Host: api-na.playground.klarna.com
Accept-Encoding: gzip, deflate
Content-Length: 495
Content-Type: application/json

Request Body (with test data):

{
    "purchase_country": "us",
    "purchase_currency": "usd",
    "locale": "en-US",
    "order_amount": 1000,
    "order_tax_amount": 0,
    "order_lines": [
        {
            "type": "physical",
            "reference": "19-402-USA",
            "name": "Battery Power Pack",
            "quantity": 1,
            "unit_price": 1000,
            "tax_rate": 0,
            "total_amount": 1000,
            "total_discount_amount": 0,
            "total_tax_amount": 0
        }
    ]
}

Response:

{
    "error_code": "INVALID_OPERATION",
    "error_messages": [
      ""
    ],
    "correlation_id": "45021dd4-b216-417a-a8e7-85f2447a936d"
}
user637563
  • 346
  • 3
  • 15
  • did you solve this already? i got the same problem, and klarna does not respond to my support mail. – andyrandy Mar 28 '19 at 08:57
  • @luschn I am probably too late for my reply to be useful to you, but if someone else has a similar problem - the issue was at Klarna's end it seems (I had posted the above question on behalf of a teammate and he said it got resolved later by Klarna). So please follow up with Klarna. – user637563 Jul 05 '19 at 13:26
  • My goodness people should think twice about using Klarna. You copy the excact data from their test examples and at the very first post call you will get consistent error message which does not tell you ANYTHING about what is wrong and is in fact not documented at all in their developer documentation. And there is nothing you can select or edit in the "portal" - it doesn't matter if you have a playground account or a real account. Apart from this the documentation is pretty good and the platform seems nice, if it only worked. I have sent a mail to them, and will update if useful response – atlmag Mar 02 '21 at 14:26

0 Answers0