Automating On-Chain Payments with Smart Contracts