Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Cost Price Rounding Logic diverges on Computed Prices API
Cost Price Rounding Logic diverges on Computed Prices API
ID: 842336
Backlog
Published on 6/12/2023
Last update on 6/12/2023

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/help-center-content/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
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 support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback