Almost a year on, India's ban on large-denomination bills has been deemed a "total failure." That's not quite fair. True, the primary goal of flushing out tax cheats has been a flop. But a secondary goal -- "to move toward the cashless society," as India's finance minister put it -- still has real promise. The rest of the world, in fact, could learn a lot from this botched experiment.A report last month showed that 99 percent of invalidated bills have now made their way back to banks, suggesting the government's plan to extinguish illicit cash has foundered. At the same time, though, currency in circulation is down by about 25 percent from where it would otherwise have been, according to Bloomberg Intelligence, while electronic transactions are up.If that trend continued, it could be a big deal. India has inefficient banks and lots of corruption. Its cost of cash -- in access fees, maintenance expenses and so on -- is among the highest in the world.Eventually going cashless would slash such costs, while also impeding crime and corruption. It would be a big help to the poor, who could borrow and send money more cheaply. More powerfully, it would give central banks a new tool for boosting aggregate demand when conventional measures won't work -- significantly negative interest rates. It's no wonder that so many governments are now thinking through the concept, and its attendant problems.But an essential precondition for doing away with cash is trust. And on that score, India's experiment provides an example of what not to do.For one thing, the note swap was undertaken rashly. The public was given a mere 50 days to exchange their big bills for smaller ones, and the central bank couldn't print enough new notes to meet demand. Lines lengthened at bank branches, small businesses folded for lack of capital, supply chains collapsed, and agricultural prices plummeted. Growth and investment stalled. Perhaps 5 million jobs were lost.For other countries, a better approach would be to phase out big bills over a period of years, making it easy to swap them at first, then progressively more difficult -- say, by exchanging them at fewer locations. That would allow time to publicize the plan, fix inevitable flaws and help the public adjust. Meanwhile, electronic alternatives would have an incentive to evolve. In time, bills of all denominations would dwindle of their own accord.Which suggests a second problem for India. After invalidating 86 percent of the currency in circulation, the government was left scrambling to encourage digital payments, using subsidies and other gimmicks. Only about half of Indian adults have bank accounts, and only about a quarter have internet access. Mobile payments remain relatively rare. Even if everyone had wanted to go digital, they couldn't have.The takeaway for other countries is to ensure reliable alternatives are available first, along with legal protections and privacy safeguards. One promising approach is digital legal tender, which might combine the advantages of electronic currencies with the stability of a central bank.India deserves credit for trying to move its economy into the digital age. Unfortunately, it also exemplified all that can go wrong along the way. As the cashless society comes into view, the rest of the world should take heed.