AUD amount modelling
Ask the calculation to explain its last cent
Review types, rounding boundaries and external units as one design. Most amount defects appear where two individually reasonable components disagree.
In this article
Read the model before the formatter
Locate the currency, rate, quantity and payable-amount types. Ask whether they can be mixed accidentally and where an invalid operation is rejected.
Inspect the database and runtime representations together. A numeric column does not ensure exact application arithmetic if the driver converts values to an ordinary floating-point number before calculation.
Check field limits and non-finite input handling. The supported contract should be narrower and clearer than whatever values the underlying numeric library happens to accept.
Work through a nontrivial example
Use a high-precision unit rate, a discount and several allocations. Calculate the expected result independently under the approved operation order.
Ask where rounding occurs and how residual cents are assigned. Repeat after reordering the input lines. If a tie-breaking rule depends on order, determine whether that order is stable and part of the policy.
Reverse the original result after changing the current policy. The system should preserve the original financial evidence and follow its documented reversal semantics.
Inspect every conversion
Follow the amount through JSON, database storage, CSV export and the payment request. Names should reveal whether a value is a decimal major-unit amount or integer minor units.
Verify a known AUD 123.45 example at the provider boundary. Check the exact request representation and ensure the adapter cannot be applied twice unnoticed.
Review display labels in mixed-currency contexts. A dollar sign alone can be ambiguous, while formatting choices must not become the source of authoritative arithmetic.
Review authority and operational evidence
Alter the client-submitted total and confirm that the server recomputes or rejects it according to the contract. Inspect the approved override path and its audit record.
Ask support to explain a synthetic one-cent discrepancy using stored evidence. If they must guess the old rounding rule, the design lacks reproducibility even if today's calculation tests pass.
Approve the implementation against specific fixtures and invariants. Record any policy decision still awaiting its business owner instead of allowing a library default to become an undocumented accounting rule.
Primary sources
PostgreSQL: numeric typesStripe: currency and amount representationReferences checked 11 September 2026.