When using Klarna payments, it's important that you include correct tax details for each order.
When you include tax details in each order, your customers get the right sense of the total order amount. Klarna payments is equipped with a validation mechanism to ensure the tax calculations are correct.
Below you can find in-depth descriptions of how this validation is done, to ensure your own validation is aligned with Klarna’s.
Customer expectations and tax legislations are different in Europe, Australia, and the US. Thus, we recommend different approaches to tax handling in each market.
If you are using Klarna in any European market or in Australia we recommend that:
tax_rate
and tax_amount
for each order line.order_tax_amount
field to sum all total_tax_amount
values at the order line level.If you are using Klarna in the US we recommend that the tax amount is transmitted as an additional order line.
name
field value for a tax order line name
should be "Tax"
or "Sales Tax"
.order_tax_amount
is the total_amount
of the sales_tax
order line.order_amount
is the sum of the total_amount
from each order line, plus the order_tax_amount
.tax_rate
field isn't present in any order lines.There are two ways to handle taxes in Klarna payments:
The global way validates taxes at the order and item level.
At the order level, the calculated total amount including tax must be within error tolerance value ±Items Quantity.
sum(items total tax amount) - sum(items) <= total tax amount <= ( sum(items) total tax amount sum(items))
At item level, the value of the calculated tax rate must be within error tolerance ±1. All item’s validation must be valid to create an order:
(calculated tax rate - 1) <= tax rate <= (calculated tax rate + 1)
where:
calculated tax rate = 100 * total tax amount / (total amount - total tax amount)
An order with 2 items is accepted. Tax validation is done at the order level and at the item level.
(9917 + 483) - 2 <= 10400 <= (9917 + 483) + 2
10400 - 2 <= 10400 <= 10400 + 2
Item 1
Calculated tax rate = (100 * 99.2) / (595 - 99.2)
Calculated tax rate = 20
2000 - 1 <= 2000 <= 2000 + 1
Item 2
Calculated tax rate = (100 * 4.8) / (29 - 4.8)
Calculated tax rate = 20
2000 - 1 <= 2000 <= 2000 + 1
An order with 2 items passes the order-level validation but is rejected at the item level.
(11900 + 580) - 2 <= 12.480 <= (11900 + 580) + 2
12480 - 2 <= 12.480 <= 12480 + 2
Calculated tax rate = (119 * 100) / (714 - 119)
Calculated tax rate = 20
2000 - 1 <= 2500 <= 2000 + 1
If an order fails validation, you'll get an error response with the incorrect field or value.
The sales tax might change between the time when an order is created to when it's shipped. For example, an order is placed on September 28 but doesn’t get shipped until October 1. Meanwhile, a new sales tax comes into effect on October 1.