As a child, you might have tried tricking the vending machine with a fake object or even a counterfeit coin, but we highly doubt that it would have worked.
The only question is, how does the machine identify money. Countertop machines such as the uv lightbox seen at many airport security checkpoints pick up the uv features that are embedded in u.
Uv & white light detectors: these light-based detection devices work by revealing invisible uv features or paper watermarks on banknotes.