Most people, at some point or another, when confronted by a vending machine that is supposed to take bills in payment, have had trouble getting it to take a bill. I have a method that has always worked for me. There are two theories as to why it works; I will explain my method in terms of one of these theories.
A vending machine that rejects your bill wishes to thwart you. It infers that you would rather have its product than the bill, and so it would leave you with the bill and deny you the product.
Now, you can keep feeding it the bill until it tires of the game and sells you the product, but who knows how long that might take? Some machines would derive endless pleasure from spitting the bill back at you.
You cannot very well say
Oh, I'd rather have this bill than the fizzy sugar water! and, hoping that the machine will be thus fooled, insert the bill. First of all, the machine probably cannot hear you anyway; and, secondly, your actions will in any case speak louder than do your words. It is a given that, at the time that you insert the bill, you would rather have the fizzy sugar water. Hence, you must persuade the machine that you have changed your mind after the insertion of the bill.
You can do this by pulling back on the bill after the rollers have grabbed it. The machine infers that you have just reälized that you won't have enough money for the bus, or have just recognized the bill as a rare collectable. In keeping with its underlying desire to thwart you, it will now hold fast to the bill, pull it inward, and dispense the product.
Feel free to laugh in triumph; as I said, the machine probably cannot hear you anyway.