The goal of this project is to build a solution for this problem statement from CloudWalk interview process.
/client
folder contains Python code for instantiating clients capable of sending requests with transactions to be validated.
/proto
folder contains Protocol Buffers (gRPC) defining the communication channel between clients and servers.
/server
folder contains Ruby code for a server capable of receiving requests with transactions to be validated.
- Chargeback
- Like retrieving the same received value amount
- Rejects any transaction with parameter
hasCbk
with valuetrue
- Rate limiter
- Like too many requests from the same user
- Accepts at most:
- 1 per second
- 5 per minute
- 50 per hour
- 100 per day
- Which means, evaluate requests with same
userId
and reject potential frauds
- Maybe to evaluate relation between:
cardNumber
andtransactionAmount
anduserId
- users don't have that many cards in general, guess less than 5 on average
- any new card for an user, suspicious
- unusual high amount for an user, suspicious
transactionAmount
anduserId
- unusual high amount for an user, suspicious
transactionAmount
andtransactionDate
anduserId
- unusual high value for an user at an odd day/time, suspicious
deviceId
andtransactionAmount
anduserId
- users don't have that many devices in general, guess less than 10 on average
- any amount from a new device, suspicious
- unusual high amount from a device, suspicious
merchantId
andtransactionAmount
anduserId
- unusual item for user, if high value and odd item, suspicious