Whenever you're ready, walk me through how you'd approach this.
Design a distributed checkout service for an e-commerce platform covering security/auth, inventory failures, payment handling and refunds when inventory allocation fails, and reliable transaction processing.
Asked in the additional HLD round stage. Explain the service boundaries, state transitions, consistency model, idempotency strategy, and failure recovery approach. If using ML for payment or account-risk decisions, describe how it is trained, served, evaluated, and monitored without blocking reliable checkout.