错误值:order_tax_amount

BAD VALUE: order_tax_amount

我正在尝试使用 Postman 发送请求来测试 Klarna 付款,根据此 API DOC,我们使用 POST /checkout/v3/orders 发送请求以便我们可以创建订单(对于测试环境,他们使用 https://api.playground.klarna.com/ + url 的其余部分),但是当我尝试发送上面给定的示例时 link(在右侧) , 它说

{ "error_code" : "BAD_VALUE", "error_messages" : [ "Bad value: order_tax_amount" ], "correlation_id" : "12255531-ffcb-4a91-a375-04577fca78e5" }

当我在 documentation 中读到它需要什么时,它说该值应该在某些公式中格式化 ±1 of total_amount - total_amount * 10000 / (10000 + tax_rate),当我计算结果 4545.4545 时更改请求中的值并重试,它给出相同的错误。 有人可以帮我吗? 谢谢

您链接的文档说 order_tax_amount 应该是 minor currency units 的整数,因此听起来 4545.4545 不是有效值!

您应该选择要舍入的方向,然后发送一个整数值。

我发现了问题,我应该将 total_tax_amountorder_tax_amount 都更改为 4545,这真是个错误,我认为他们应该在他们的文档中更新它,以便更多人熟悉一下。