Build a Three-Service Refund Workflow over HTTP
Last updated: August 4, 2026
Quick Overview
Design a refund workflow involving three services that communicate over HTTP, detailing how they interact to process refunds effectively.
DoorDash
August 4, 202612
0
126 solved
Design a refund workflow involving three services that communicate over HTTP, detailing how they interact to process refunds effectively.
This question is commonly asked during technical screens to assess a candidate's understanding of service-oriented architecture and their ability to design scalable systems. The interviewer evaluates the candidate's ability to think through the interactions between multiple services, ensuring reliability and efficiency in the refund process.
What the Interviewer Expects
- Clearly outline the roles of each of the three services involved in the refund process.
- Describe the HTTP communication methods used between services (e.g., GET, POST).
- Discuss error handling and retries in the workflow.
- Explain how to ensure data consistency and integrity throughout the process.
- Consider scalability and performance implications of the design.
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- How would you handle a situation where one of the services is down?
- What would you do to ensure the security of the data being transferred?
- Can you explain how you would test this workflow?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
To build a three-service refund workflow, we need to define the roles of each service. For instance, we could have a Payment Service that handles the initial transaction, a Refund Service that pro...
High-Level Design
The workflow can be structured as follows:
- User Initiates Refund: The user requests a refund through the frontend, which sends a POST request to the
Refund Service. - Refund Processing: ...