With cash, buyers and sellers can be certain that payment is final. This is an absolutely vital public good, which has always been provided by the central bank. All other payment types, from debit cards to credit cards to cheques, work through intermediaries in the financial system. Yes, of course, they are safe. But, fundamentally, they can never be quite as risk-free as cash.
Just ask yourself—if you were concerned that an imminent cyber attack was about to hit the financial system, would you not want to carry some extra cash until everything was back to normal? Nonetheless, it is natural that transactions using electronic payments, such as debit and credit cards, continue to grow in volume and value relative to cash.