Discount rounding breaks legally mandated cash rounding conventions (UYU, SEK, CAD and more)

When a percentage discount produces a fractional amount, Shopify keeps the decimals and applies the discount to the currency subunit (cents). For a store in Uruguayan pesos (UYU) this produces amounts that cannot be charged or collected as displayed.

Example from a live UYU store:

  • Item price: 2,701.00 UYU
  • Discount: 10% (bank transfer promotion)
  • Applied discount: 270.10
  • Checkout total: 2,430.90
  • Correct total under local practice: 2,431 (discount 270, total rounded half up to the whole peso)

This is not a store preference. Uruguay’s central bank (BCU) withdrew the 50 centesimo coin from circulation in 2010, leaving 1 peso as the smallest denomination, so transactions are settled in whole pesos and totals with centesimos cannot actually be collected: https://www.lr21.com.uy/economia/415382-adios-a-las-monedas-de-050

The practice of rounding totals to the smallest usable currency unit is a recognized convention called cash rounding (Swedish rounding), and it is a legal or government-mandated rule in multiple countries:

I also found other countries and currencies where this is official policy:

  • Sweden (SEK): rounding to the whole krona since the 50 ore coin was withdrawn in 2010.
  • Canada (CAD): rounding cash totals to the nearest 5 cents, per the Government of Canada guideline after the penny was phased out in 2013
  • New Zealand (NZD) and Australia (AUD): rounding to the nearest 5 or 10 cents since their smallest coins were withdrawn.

On top of that, ISO 4217 defines a whole set of currencies with no minor unit at all (minor unit 0), where whole-unit amounts are the only valid representation: JPY, KRW, CLP, PYG, ISK, VND, XOF, XAF, XPF, BIF, DJF, GNF, KMF, RWF, UGX, VUV.

More info here: ISO 4217 - Wikipedia


Proposed solution:
Support rounding of discount amounts and order totals to the currency’s smallest practical unit with standard half up rounding, either automatically per currency or as a setting exposed to Functions.

Shopify does support cash rounding for point-of-sale (POS) transactions in some countries: https://help.shopify.com/en/manual/sell-in-person/shopify-pos/cash-rounding-on-pos, and support for merchants to configure cash rounding on POS for any country (including Uruguay) will be coming soon.

Note that non-cash payments are never rounded, as you pointed out in https://en.wikipedia.org/wiki/Cash_rounding:

The amount payable for a cash transaction is rounded to the nearest multiple of the minimum currency unit available, whereas transactions paid in other ways are not rounded (for example electronic funds transfer such as with payment cards, or negotiable instruments such as cheques).

Two approaches : Do product pricing in such a way that the discounted value is a rounded figure.
or
Your discount function should have an addiitonal logic to round of the final price at the row level so a custom discount function will be needed.