Accept input parameters: principal, interest rate, duration (years) via JSON POST body. n = Total payments (years * 12) If interest rate is 0, M = P / n Validate all inputs are positive numbers.