Menu
Feedback
Start here

Known issues

Known issues
Cost Price Rounding Logic diverges on Computed Prices API
Catalog
ID: 842336
Backlog
Published on6/12/2023
Last updated on6/12/2023
1 min read

Summary

Currently, the computed price API has a prop named 'cost price' that on specific scenarios might show a 1 cent difference between its value on the UI and the computed prices API https://developers.vtex.com/docs/api-reference/pricing-api#get-/pricing/prices/-itemId-/computed/-priceTableId-

Simulation

Set a product with a cost price of 67.82 and no markup.

Check the pricing UI and the response from this API, which should deliver:

{"base64":"  ","img":{"width":486,"height":197,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":10689,"url":"https://raw.githubusercontent.com/vtexdocs/known-issues/refs/heads/main/docs/en/known-issues/Catalog/cost-price-rounding-logic-diverges-on-computed-prices-api_1.png"}}

Even though the correct value is 67.82

Workaround

Setting fixed prices or a price rounding fixes it.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback