Cannot capture amount since sum does not match

[ad_1]

We having a problem while capturing payment. The create order request and capture request does not match.

Capture response:
{ "error_code": "CAPTURE_NOT_ALLOWED", "error_messages": [ "Captured amount is higher than the remaining authorized amount. Capture not possible." ], "correlation_id": "XXX" }

I found that prices are calculated wrong when a shipping fee is used. Create order llok like this:
{ "reference": "flat_rate:2", "name": "DHL", "quantity": 1, "unit_price": 9880, "tax_rate": 2506, "total_amount": 9880, "total_discount_amount": 0, "total_tax_amount": 1980, "type": "shipping_fee" }

Capture look this is:
{ "reference": "flat_rate:2", "type": "shipping_fee", "name": "DHL", "quantity": 1, "unit_price": 9900, "tax_rate": 2500, "total_amount": 9900, "total_discount_amount": 0, "total_tax_amount": 2000 }

My settings are: https://imgur.com/a/ybE320P
Price for shipping should be 99 sek.

What could be the problem with this miscalculation?

* WordPress 6.5.4
* WooCommerce 8.9.3
* Klarna Checkout for WooCommerce 2.12.4
* Klarna Order Management for WooCommerce  1.9.1 

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer