Concept Flow - Payable functions
Call function
Is function payable?
No→Reject transaction
Yes
Accept Ether sent
Execute function code
Update contract balance
Return success
When a function is called, the system checks if it is payable. If yes, it accepts Ether and runs the function; otherwise, it rejects the transaction.