According to Homakov (via Business Insider), he claims that this is done by exploiting a bug in payments software systems known as “race conditions”. There’s a bunch of code involved in explaining how this works, but basically it involves transferring the money from one card to the other and because of the bug, he found out how to increase the amount which in turn let him transfer more than what he really had.
Instead of exploiting this and creating a Starbucks card with hundreds, if not thousands of dollars on it, Homakov stopped at $16 and decided to test his hack out at a local Starbucks in which he successfully bought himself an entire meal. He then, for legal reasons, topped up the card an extra $10 so it didn’t look like he was stealing.
Homakov claims that trying to get in touch with Starbucks about the problem was rather difficult. In fact he claims that a Starbucks employee used words like “malicious actions” and “fraud” rather than thanking him, but all in all it appears that the bug has since been resolved, thankfully too given that there has been a recent spate of hacking in which customers have had money stolen through the Starbucks mobile app.