Interview practice question
Payment fails after stock is reserved
Backend Engineering · Microservices · Intermediate
In your order flow, stock is reserved and then the payment fails. Design how the system handles this across services.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Saga with compensating actions.
- Payment failure → release stock, cancel order.
- Orchestrator or events track state.
- Idempotent compensations with retries.
- Notify user; order state machine.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.