The past several years have witnessed an explosive growth in cryptocurrencies, but the blockchain-based cryptocurrencies have also raised many concerns, among which a crucial one is the scalability issue. Suffering from the large overhead of global consensus and security assurance, even the leading cryptocurrencies can only handle up to tens of transactions per second, which largely limits their applications in real-world scenarios. Among many proposals to improve the cryptocurrency scalability, one of the most promising and mature solutions is the payment channel network (PCN), which offers the off-chain settlement of transactions with minimal involvement of expensive blockchain operations. In this paper, we investigate the problem of payment routing in PCNs from an optimization perspective, which is to minimize the transaction fee of a payment path, subject to the timeliness and feasibility constraints. We present an optimal distributed algorithm CheaPay for this problem. Extensive simulations demonstrate that CheaPay significantly outperforms baseline algorithms in terms of the success ratio and the average accepted value.