From Code to Coins: Understanding Smart Contracts in Blockchain Payments