TenkeyBridge
← Back to blog

Why a $0.0725 Rate Came Back as $0.07: Sub-Cent Prices on QuickBooks Desktop

  • quickbooks desktop unit price decimals
  • quickbooks rate rounding
  • sub-cent pricing quickbooks api
  • quickbooks pricetype precision
Isometric illustration of a balance scale weighing a sliver of a coin against a stack of whole coins.

Quick answers

  • Why did my 0.0725 unit price come back as 0.07? The gateway was rounding line Rate to two decimals before writing to Desktop, and QuickBooks then recomputed Amount from the rounded rate.
  • How many decimals does QuickBooks Desktop keep on a price? Desktop PRICETYPE fields carry 5 decimal places; amount fields stay at 2.
  • Is sub-cent pricing supported now? Yes — since gateway v126 (2026-10-28), sales line Rate and expense item line Cost/Rate go to Desktop at 5 decimal places.
  • What was the workaround before that? Send Qty plus a computed Amount and omit Rate, so nothing recomputes the amount for you.
  • Do amounts ever hold more than two decimals? No. Amounts are money and stay at cents, on Desktop and in the API response.

The report

On 2026-10-27 we got a report from an integration that bills lab tests per unit at sub-cent rates. Their invoice lines looked like this going in:

{
  "SalesItemLineDetail": {
    "ItemRef": { "value": "42" },
    "UnitPrice": 0.0725,
    "Qty": 20000
  },
  "Amount": 1450.00,
  "DetailType": "SalesItemLineDetail"
}

Twenty thousand tests at $0.0725 each is $1,450.00. What came back was $1,400.00.

Nothing dropped a line, nothing errored, nothing retried. The invoice wrote cleanly, the response was a 200, and the number was wrong by $50 on a single line. That's the worst shape a bug can take: silently plausible. An invoice for $1,400.00 looks like an invoice. If you're reconciling against your own billing system you catch it at the penny level; if you're eyeballing a PDF you don't.

The cause was ours. The gateway was normalizing UnitPrice to two decimal places on the way into Desktop — rounding 0.0725 to 0.07 — and then QuickBooks did what QuickBooks does: it recomputed the line amount from the rate it was given. 20000 × 0.07 = 1400.00. The Amount we sent alongside it was overwritten. Desktop treats rate × quantity as authoritative when a rate is present.

Price fields and amount fields are different types

The thing that made this a real bug rather than a rounding preference is that QuickBooks Desktop already stores prices more precisely than cents. In the qbXML schema, unit prices are a PRICETYPE — five decimal places. Amounts are AMTTYPE — two.

That distinction is doing a lot of work, and it's a sane one:

  • A price is a ratio. Dollars per test, dollars per gram, dollars per API call. Ratios don't have to land on a currency unit, and for anything metered they usually don't. $0.0725 per test is a real price that someone negotiated.
  • An amount is money. It's what lands on a line, a register, a deposit. Money is denominated in cents and nothing downstream knows what to do with a third of one.

So Desktop's model is: carry the precision in the price, collapse to cents at the amount. Multiply 0.0725 by 20000, round once, write 1450.00. The rounding happens at exactly one place, at the last possible moment, which is the behavior you want.

Our normalizer didn't make that distinction. It saw a money-ish decimal field on a money-ish object and quantized it. That's a defensible default for Amount, TotalAmt, Balance, and every tax and discount field on the document. It's wrong for Rate.

The QBO API, for its part, doesn't advertise a hard precision limit on UnitPrice, and developers who've only shipped against QBO tend to assume a price is just a number. Pointing that same code at Desktop is where the assumption gets tested — this is the class of difference we try to enumerate in the checklist for pointing a QBO integration at Desktop, and it's the kind that doesn't announce itself with an error.

What the integrator did in the meantime

Their workaround was good and you can still use it: send Qty and Amount, omit Rate.

{
  "SalesItemLineDetail": {
    "ItemRef": { "value": "42" },
    "Qty": 20000
  },
  "Amount": 1450.00,
  "DetailType": "SalesItemLineDetail"
}

With no rate in the request, there's nothing for Desktop to recompute from, and the amount you computed is the amount that gets stored. You own the multiplication and the rounding, which for a metered-billing system you probably want to own anyway — your invoice has to agree with your usage ledger to the penny, and the only way to guarantee that is to do the arithmetic once, in your code, and transmit the result.

The trade-off is what the line looks like afterward. Without a rate, the printed invoice and the QuickBooks UI show a quantity and an extended amount and no unit price. A bookkeeper opening the line can't see what each test cost. For some businesses that's fine; for anyone whose customers audit per-unit pricing, it isn't. It also means a later edit in the QuickBooks UI — someone changing the quantity from 20000 to 19000 — won't rescale the amount, because there's no rate to rescale from. The line goes stale silently, which is its own version of the original problem.

If you're carrying that workaround and your sync does partial updates, be aware of how it interacts with sparse updates versus full replacement: a sparse update that reintroduces a Rate onto a line that was deliberately rate-less will hand the arithmetic back to Desktop.

The fix

Gateway v126, shipped 2026-10-28 (PR #392). The normalizer now distinguishes price fields from amount fields:

  • Sales line Rate passes through to Desktop at 5 decimal places.
  • Expense item line Cost/Rate passes through at 5 decimal places.
  • Amounts are unchanged — still 2 decimal places, still money.

The PR landed with tests that a 0.0725 rate survives the round trip: write the line, read it back, get 0.0725 and an amount of 1450.00.

Post-v126, the original request body works as written. You can send UnitPrice: 0.0725 with Qty: 20000, let Desktop do the multiply, and get $1,450.00 with a visible unit price on the printed line. You can also keep sending Qty + Amount if you'd rather own the arithmetic — both paths are supported, and the choice is about who you want holding the rounding rule, not about what the API will accept.

What still rounds

Five decimals is a real limit, not a stand-in for arbitrary precision. If you send a rate with more than five decimal places, it gets rounded to five before it reaches Desktop, because that's what the field holds. For prices like 0.000125 per unit — fractions of a basis point, metered API calls at a tenth of a mill — you're back to computing the amount yourself, or restating the price in larger units (per thousand calls rather than per call), which is usually the better answer anyway because it's also what the customer wants to read on the invoice.

And the amount is still cents. 7 units at 0.0725 is 0.5075, which stores as 0.51. Desktop rounds, your billing system had better round the same way, and if you're summing thousands of lines the place those two rounding rules diverge is the place your reconciliation breaks. Round at the invoice line in both systems, not at the end.

Testing sub-cent pricing before you ship it

This is cheap to verify and worth verifying, because the failure mode is a correct-looking number.

  1. Write the line in the sandbox. Same REST surface, same OAuth2, no QuickBooks install required — the mechanics are the same ones covered in building against Desktop without installing QuickBooks.
  2. Read it back and assert on both fields. Not just the amount — the amount can be right while the rate is wrong, if the quantity happens to absorb it. Assert UnitPrice == 0.0725 and Amount == 1450.00.
  3. Pick a quantity that makes rounding visible. 20000 × 0.0725 is clean. 20000 × 0.07 is off by $50. If your test quantity is 1, a rate bug of this kind rounds to a difference you'll never see.
  4. Test the half-cent case too. A line whose extended amount lands on 0.5075 tells you how the rounding behaves at the boundary, and whether your side agrees.
  5. Check a line you edited. Update the quantity on an existing rate-carrying line and confirm the amount rescales the way you expect.

Here's the readback shape you should be asserting against:

{
  "Line": [{
    "Id": "1",
    "Amount": 1450.00,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
      "ItemRef": { "value": "42", "name": "Panel A Test" },
      "UnitPrice": 0.0725,
      "Qty": 20000
    }
  }]
}

For the general case of where Desktop behavior diverges from QBO's documented behavior, the compatibility matrix is the place we track it. Field precision is one of the categories that lives there, and it's the kind of thing that's easier to look up than to discover from a $50 discrepancy.

FAQ

How many decimal places does QuickBooks Desktop keep on a rate?

Five. Desktop's PRICETYPE fields — sales line rates, item costs, item sales prices — carry 5 decimal places. Anything finer than that is rounded to five before it's stored.

Why did my invoice amount change after I wrote it?

Most often because Desktop recomputed it. When a line carries both a rate and a quantity, QuickBooks treats rate × quantity as the source of truth for the amount and overwrites whatever amount you sent. If the rate it received wasn't the rate you intended — because of rounding, a currency conversion, or an item's default price filling in — the amount moves with it.

Do amount fields keep more than two decimal places?

No. Amounts are money and are stored at 2 decimal places, on Desktop and in what the API returns. Precision lives in the price, not the amount; the multiply-and-round happens once, at the line.

Does this affect purchase orders and bills too?

The v126 change covers sales line Rate and expense item line Cost/Rate, which is where item-level unit pricing appears on both the sales and purchase sides. Account-based expense lines carry an amount rather than a rate, so there's no sub-cent price to preserve on them.

Does currency conversion interact with this?

Exchange rates are their own field with their own precision and are applied separately from line pricing. If you're seeing a discrepancy on a foreign-currency document, check the rate and the amount independently before assuming the line price rounded — and read how Desktop errors and faults map back to QBO shapes if the write is failing rather than just disagreeing.

How do I know which gateway version I'm on?

The gateway version is reported in the API response headers. Sub-cent rate pass-through requires v126 or later; before that, the Qty + Amount approach is the reliable path. If you want to poke at this yourself, the sandbox takes a 0.0725 rate and hands it back — or start from the quickstart.