The real story
When small rupiah coins run short, many Indonesian shops hand over a sweet instead of Rp100 or Rp200 in change. It's so common that customers usually just shrug. Indonesia's Currency Law (No. 7 of 2011) says the rupiah must be used for every payment and settlement inside the country. Lawyers and Bank Indonesia point out that change counts too, and the law's penalty clause goes up to a year in jail or a Rp200 million fine.
Nobody gets prosecuted for a mint, but Bank Indonesia has said shoppers are entitled to refuse candy and ask for proper change. Consumer-protection law backs them up. The underlying problem is that small coins don't circulate much: people leave them in jars and drawers, so cashiers run out.