30 mins System Design Exercise: Payment Card Fraudulent Detection In Production System
Requirements and clarification. (Short version)
First design draft to make sure functional requirements are met.
Polling service will call the 3rd party service to get a list of newly added fraudulent cards and store them in the database.
An fraudulent service will expose a GET API to accept queries for fraudulent check, and returns with either risky or not. It will take the encrypted payment card number and check the DB against it, if there is an entry, the card is fraudulent.
Confirm with interviewer if this is the right direction and if you have missed anything.
Second version with more detailed design and take none functional requirements into action.
领英推荐
Handle additional requirements. What if we need to notify service consumers about the fraudulent cards after transaction taken place.
A service to run periodically and get transactions from last 2-4 weeks (configurable, based on analytics and business requirements) and cross check in the fraudulent service, identify and risky actions and notify the users through multiple channels.
Transaction service need to provide at least payment details and customer info for communication.
Final design.
Always remember, it is not just about technology, focus on the problem to solve with the resources you have. Provide reasoning for each decision.
Happy designing!