As I interact more and more with the POS UI Extensions, I’ve been noticing some inconsistencies in how it works versus what is documented and specially with the new testing package and mocks, trying to replicate real world POS becomes hard given the types are not what we expect.
A few examples I’ve found:
Both of these properties are said to return undefined for custom sales items, but in the latest version of the POS, running 2026-07 extensions, on iOS and iPadOS, the values returned are number NaN.
Another example:
Always a positive integer. also not a true statement, if you addLineItem(variantId, 1) and then addLineItem(variantId, -1) (assuming starting from a clear cart), this value will be 0.
On the same topic,addLineItem(variantId, -X)is also an undocumented behavior many apps rely on.
There is quite a bit of undocumented behavior that can either be very helpful (the addLineItem trick is for sure the largest one), or sometimes cause bugs (e.g: Custom Sales are added with a default lineItem property by Shopify which if you are not aware of, you might end-up overwriting or clashing during bulk operations).
I can give some more examples if desired, but overall, I’d like to see some sort of improvement to the Cart API documentation and types, and a more complete reference, with best practices guidance for it as it’s such a vital part of POS UI Extensions.