How do prices in minor units work in the WooCommerce Store API?

By the Ingenious AI team · Published 14 November 2026 · Reviewed 14 November 2026

Check your own store free. AgentReady fetches your catalog, structured data, crawler rules and policies, then shows — with evidence — what AI shopping agents can and cannot read.

Scan my store free → Check one product's truth →

The short answer

Store API prices are integers, not decimals: prices.price 2400 with minor_unit 2 and currency_code USD means $24.00. AgentReady converts with the feed's own minor_unit before comparing the feed price against your page and JSON-LD prices — so when your accuracy check fails with prices differing by exactly 100×, the cause is almost always a unit or currency misconfiguration in the feed, not a stale price on the page.

What is minor units?

Minor units are the smallest subdivision of a currency — cents for the dollar, euro or pound. The WooCommerce Store API publishes prices as integers in minor units: the value 2400 with a minor_unit of 2 means 24.00. The conversion is price divided by 10 to the power of minor_unit, using the minor_unit the feed itself supplies.

Why the API speaks in integers

Money and floating-point arithmetic are old enemies: decimals stored as binary fractions produce the classic 0.1 + 0.2 problem, and a price that wobbles in the fifteenth decimal place is a bug farm. Commerce systems dodge this by storing money as integers in the currency's smallest unit. The Store API follows the convention: each product's prices object carries the price as an integer string in minor units, the currency_code it is denominated in, and the minor_unit — how many decimal places the conversion assumes.

For the major currencies agents meet daily — USD, EUR, GBP — minor_unit is 2. Some currencies use 0 (no subdivision in practice) or 3. The system is exact and unambiguous as long as the three values travel together and agree. Every reader — the store's own checkout blocks, an agent, the AgentReady scanner — performs the same division and arrives at the same amount. The failures begin when the values stop agreeing with each other or with the store's actual prices.

How AgentReady converts — and what it compares

When the scanner builds the cross-surface comparison, it takes the first sampled product's prices.price, reads the prices.minor_unit from the same object (defaulting to 2), and converts: price divided by 10^minor_unit, formatted to two decimals. That converted value is what appears in the report's surfaces — store_api_price beside structured_data_price and visible_page_price — so the values you see quoted in a conflict are already in the units a buyer would recognise.

This conversion is why the evidence is diagnostic. If the feed publishes 2400 with minor_unit 2, the feed surface reads 24.00 and should meet the page's $24.00 exactly. If a plugin or a currency switcher rewrites the price to 24 (the major-unit value) while minor_unit stays 2, the feed surface reads 0.24 — and the conflict line practically names the culprit, because genuine staleness produces arbitrary differences, while unit errors produce differences of exactly 10, 100 or 1,000.

The factor-of-100 failure, in its three costumes

Costume one: a currency or price plugin writes major-unit values into the feed. The page shows $24.00; the feed says 24 with minor_unit 2; every reader who converts honestly concludes the product costs twenty-four cents. Costume two: the reverse — a feed normaliser divides twice, publishing 240000 for a $24 product, and agents quote $2,400. Costume three: minor_unit itself is wrong — set to 0 by a currency configuration that treats the dollar as unsubdivided — so a correct integer of 2400 reads as $2,400.00.

All three costumes share a signature: the conflict ratio is a clean power of ten, and it afflicts every product in the feed at once, not just one. A single-product conflict at an odd ratio (28.00 vs 24.00) is staleness — one surface missed an update. A whole-feed conflict at exactly 100× is configuration. Reading the signature correctly halves the debugging time, because configuration lives in one place while staleness lives wherever the update path broke.

Currency codes: the denomination half of the price

An integer without a denomination is just a number, so the prices object also carries currency_code — and the truth check compares currency across surfaces as its own field: the feed's currency_code against the JSON-LD offers.priceCurrency against the currency the page actually charges in. Multi-currency stores are where this breaks: a switcher renders the page in EUR for a visitor while the feed publishes USD, and an agent that mixes the two surfaces quotes a dollar price with a euro symbol, or converts a price that was already converted.

The AgentReady full scan grades price and stock agreement; the free truth check on a single product adds the currency comparison explicitly, across the visible page, the structured data, the catalog feed and an agent-crawler fetch. If your store sells across currencies, the truth check on your flagship product is the fastest way to see which surface denominates what — before an agent assembles the same table in front of a buyer.

Regular, sale and the integer the feed chooses

The prices object carries more than one amount — regular_price alongside price (the effective selling price) — and readers quote the effective one. Trouble starts when a sale is configured in a plugin that adjusts the displayed price through filters the feed path does not apply, so the feed's effective price remains the regular one while the page shows the sale. The integers are well-formed; the surfaces simply disagree about which integer is the price today. That is an accuracy failure of the stale kind, covered fully in the sale-price guide in this series.

The minor-units discipline that prevents most of this is single-sourcing: let WooCommerce's product price fields — regular and sale — be the only place prices are authored, and let every surface (page template, JSON-LD emitter, feed) read from them. Plugins that rewrite prices at display time create a second source of truth that the feed cannot see. When the scan quotes a conflict, it is almost always pointing at exactly such a second source.

Debugging a unit problem in ten minutes

Fetch the feed yourself and pick the product from your report. Read its three numbers: prices.price, prices.minor_unit, prices.currency_code. Do the division by hand. If the result is not the price on the product page, you have found the misconfiguration — now hunt where the feed's values are produced: currency settings, multi-currency plugins, feed customisations. If the result is correct but the page or JSON-LD disagrees, you have staleness instead, and the fix is in the template or emitter for that surface.

Finish by re-running the free scan and confirming the accuracy check passes with all three surfaces showing the same converted value in the evidence. And if the problem was configuration, note it in your change log: unit configurations are exactly the kind of setting a future plugin install silently reverts, and the re-scan diff on Pro and Agency — which re-runs this conversion on every scheduled scan — is the tripwire that will catch the revert within a day instead of a season.

Minor-units check: five things to verify

One product, three numbers, one division — this is the fastest diagnostic in the whole readiness set:

  1. Fetch your feed and read one product's prices.price, prices.minor_unit and prices.currency_code together — never judge the integer alone.
  2. Divide price by 10^minor_unit by hand and confirm it equals the price shown on the product page.
  3. If a scan conflict differs by exactly 10×, 100× or 1,000×, treat it as configuration (units/currency), not staleness.
  4. Run the free truth check on a flagship product and confirm the currency field agrees across page, JSON-LD and feed.
  5. After changing currency or pricing plugins, re-fetch the feed and re-run the scan before assuming the conversion still holds.

Worked example: the $24 candle that agents priced at 24 cents

A fictional candle store in Belize, Amber Wick Co., installs a currency plugin to show EUR prices to European visitors. The plugin also 'helpfully' normalises the Store API feed, rewriting prices.price from minor units to major units — 2400 becomes 24 — while leaving minor_unit at 2. Every honest reader now converts 24 ÷ 100 and prices the candle at $0.24. The store's scan fails accuracy with the signature written plainly in the evidence: store_api_price 0.24, structured_data_price 24.00, visible_page_price 24.00.

Because the ratio is exactly 100 and every sampled product is affected, the owner skips the stale-template hunt and goes straight to the plugin's feed setting, disables the normalisation, and re-fetches: prices.price is 2400 again. The re-scan passes accuracy with all three surfaces at 24.00 — and the owner pins a note above the plugin's settings page: 'Feed prices are minor units. Do not normalise.' Some of the most expensive bugs in agent commerce are one checkbox deep.

Frequently asked questions

How does AgentReady convert a Store API price?

It divides the integer prices.price by 10 raised to the prices.minor_unit from the same product object (defaulting to 2 when absent), and formats the result to two decimals. That converted value is the store_api_price shown in the accuracy comparison.

My scan shows prices of 0.24 vs 24.00. What happened?

A unit mismatch: something wrote major-unit values (24) into a field readers convert as minor units (24 ÷ 100 = 0.24) — typically a currency or feed plugin 'normalising' the API output. Whole-feed conflicts at exactly 100× are configuration errors, not stale prices.

Does the check also compare currencies?

The full scan's accuracy check compares price and stock values. Currency gets its own field-by-field comparison in the free truth check, which compares the feed's currency_code, the JSON-LD offers.priceCurrency and the page's charge currency across four fetched surfaces.

Which price does the feed comparison use — regular or sale?

The effective selling price: the scanner converts prices.price (not regular_price). If a sale plugin changes only the displayed price and not the product's price fields, the feed will disagree with the page — an accuracy conflict the report quotes with both values.

Are minor units a WooCommerce quirk or a wider convention?

A wider one: integer minor units are how commerce systems avoid floating-point money errors. The convention is safe when price, minor_unit and currency_code travel together and agree — the failures are always a disagreement among the three, which is what the scan's evidence exposes.

AgentReady is built by Ingenious AI. Every verdict in an AgentReady scan traces to values actually fetched from the store — no live AI-agent queries are run or claimed.