Recent years have witnessed the advances of e-money systems such as Bitcoin, PayPal and various forms of stored-value cards. This paper adopts a mechanism design approach to identify some essential features of different payment systems that implement and improve the constrained optimal resource allocation. We find that, compared to cash, emoney technologies allowing limited participation, limited transferability and non-zerosum transfers can help mitigate fundamental frictions and enhance social welfare, if they satisfy conditions in terms of parameters such as trade frequency and bargaining powers. An optimally designed e-money system exhibits realistic arrangements including nonlinear pricing, cross-subsidization and positive interchange fees even when the technologies incur no costs. Regulations such as a cap on interchange fees (à la the Dodd- Frank Act) can distort the optimal mechanism and reduce welfare.