{"id":18584824,"date":"2025-08-04T15:36:49","date_gmt":"2025-08-04T15:36:49","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/product-prices-without-decimals\/"},"modified":"2025-08-04T15:36:49","modified_gmt":"2025-08-04T15:36:49","slug":"product-prices-without-decimals","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/product-prices-without-decimals\/","title":{"rendered":"Product prices without decimals"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have a clean WordPress WooCommerce environment where i&#8217;m testing an issue I have. I have the following WooCommerce settings:<br \/>\n&#8211; Enabled taxes<br \/>\n&#8211; Currency options &gt; Number of decimals: 0<\/p>\n<p>Now I have products like 349,95 which is rounded up and shown as 350 because i&#8217;ve disabled the decimals. This is all working great until I start the Mollie payment. So I&#8217;ve checked the debug logs and this is what I get:<\/p>\n<p>2025-08-04T15:23:39+00:00 Foutopsporing [2025-08-04T15:23:39+0000] Error executing API call (422: Unprocessable Entity): Line item 1 is invalid. The &#8216;vatAmount&#8217; field is off. Expected to be \u20ac95.38 (\u20ac549.55 \u00d7 (21.00 \/ 121.00)), got \u20ac95.00. Documentation: https:\/\/docs.mollie.com\/reference\/handling-errors. Request body: {&#8220;status&#8221;:422,&#8221;title&#8221;:&#8221;Unprocessable Entity&#8221;,&#8221;detail&#8221;:&#8221;Line item 1 is invalid. The &#8216;vatAmount&#8217; field is off. Expected to be \u20ac95.38 (\u20ac549.55 \u00d7 (21.00 \/ 121.00)), got \u20ac95.00&#8243;,&#8221;field&#8221;:&#8221;lines.1.vatAmount&#8221;,&#8221;_links&#8221;:{&#8220;documentation&#8221;:{&#8220;href&#8221;:&#8221;https:\/\/docs.mollie.com\/reference\/handling-errors&#8221;,&#8221;type&#8221;:&#8221;text\/html&#8221;}}}. Field: lines.1.vatAmount<\/p>\n<p>2025-08-04T15:23:39+00:00 Foutopsporing ideal: Failed to create Mollie payment object for order 8123: [2025-08-04T15:23:39+0000] Error executing API call (422: Unprocessable Entity): Line item 1 is invalid. The &#8216;vatAmount&#8217; field is off. Expected to be \u20ac95.38 (\u20ac549.55 \u00d7 (21.00 \/ 121.00)), got \u20ac95.00. Documentation: https:\/\/docs.mollie.com\/reference\/handling-errors. Request body: {&#8220;status&#8221;:422,&#8221;title&#8221;:&#8221;Unprocessable Entity&#8221;,&#8221;detail&#8221;:&#8221;Line item 1 is invalid. The &#8216;vatAmount&#8217; field is off. Expected to be \u20ac95.38 (\u20ac549.55 \u00d7 (21.00 \/ 121.00)), got \u20ac95.00&#8243;,&#8221;field&#8221;:&#8221;lines.1.vatAmount&#8221;,&#8221;_links&#8221;:{&#8220;documentation&#8221;:{&#8220;href&#8221;:&#8221;https:\/\/docs.mollie.com\/reference\/handling-errors&#8221;,&#8221;type&#8221;:&#8221;text\/html&#8221;}}}. Field: lines.1.vatAmount<\/p>\n<p>As you can see the amount sent to Mollie doesn&#8217;t correspond with the amount which Mollie calculates. This is the POST data:<\/p>\n<pre><code>{\n    &quot;amount&quot;: {\n        &quot;currency&quot;: &quot;EUR&quot;,\n        &quot;value&quot;: &quot;550.00&quot;\n    },\n    &quot;description&quot;: &quot;Bestelling XXXX&quot;,\n    &quot;redirectUrl&quot;: &quot;https:\/\/xxxxx\/afrekenen\/order-received\/XXXX\/?key=wc_order_XXXX&amp;order_id=XXXX&amp;filter_flag=onMollieReturn&quot;,\n    &quot;webhookUrl&quot;: &quot;https:\/\/xxxxx\/wc-api\/mollie_wc_gateway_ideal?order_id=XXXX&amp;key=wc_order_XXXX&amp;filter_flag&quot;,\n    &quot;method&quot;: &quot;ideal&quot;,\n    &quot;issuer&quot;: &quot;&quot;,\n    &quot;locale&quot;: &quot;nl_NL&quot;,\n    &quot;dueDate&quot;: &quot;&quot;,\n    &quot;metadata&quot;: {\n        &quot;order_id&quot;: XXXX\n    }\n}<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-18584824","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18584824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18584824\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18584824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}