What are people saying when I buy something using the exact change?
It is most likely "剛好" [gang1 hao3] - "just exactly right"

Short for : "不多，不少， 剛剛好"  (not more, not less, just exactly right) 

The cashier say that to confirm it is the exact amount of money for the purchase (so the purchase is accepted, but no change will be given)

Or 

It could be "正好"  [zheng4 hao3] - "just exactly right"

Short for : 正好 (X amount) - confirming the amount of money you give him or her is the exact amount for the purchase

Chances are, you heard them both in different time from different cashiers. Both are what a cashier could say when someone pays with exact change.