2

I am working on integrating Klarna Payments into a website. Unfortunately I have problems getting a successful session response when I add taxes to the request. Without taxes it works well. Can anyone please tell me what I am doing wrong?

I am testing on european Klarna playground: https://api.playground.klarna.com/

Here is my request sending data:

{
"purchase_country": "DE",                                                                                     
"purchase_currency": "EUR",
"locale": "de-DE",
"order_amount": 10000,
"order_tax_amount": 1600,
"order_lines": [
{
    "type": "physical",
    "reference": "19-402",
    "name": "Battery Power Pack",
    "image_url": "https://www.exampleobjects.com/logo.png",
    "product_url": "https://www.estore.com/products/f2a8d7e34",
    "quantity": 1,
    "tax_rate": 1600,
    "total_amount": 10000,
    "total_tax_amount": 1600,
    "unit_price": 10000,
    
}
]

}

The response I get from Klarna API is:

{"error_code":"BAD_VALUE","error_messages":["Bad value: order_lines[0].total_tax_amount"],"correlation_id":"c651f01d-dcfd-432d-9b34-39890e2d557e"}

Any suggestions are appreciated.

MrNasto
  • 21
  • 3
  • if it is specific about klarna product, why dont you ask their support department? – duc mai Nov 09 '20 at 15:45
  • I did. but didn't get any reaction since a few days. So I thought I could find some Klarna experts here simultaneously due to timing advantages :-) – MrNasto Nov 10 '20 at 12:30
  • @MrNasto Did you manage to make it work? I'm trying exactly same as described here but still throws same error. https://developers.klarna.com/documentation/klarna-payments/in-depth-knowledge/tax-handling/ – Vaibhavraj Roham Dec 29 '20 at 07:13

1 Answers1

0

From Klarna docs:

Must be within ±1 of total_amount - total_amount * 10000 / (10000 + tax_rate). Negative when type is discount.

padaleiana
  • 955
  • 1
  • 14
  • 23