Stripe University New Grad OA 2024

Recently i have applied to Stripe through there University New Grad program . My resume got shortlisted and i got the link for the OA.
I tried to look for the test pattern but couldn't find anything related to Stripe's OA, so I gave the OA and thought of sharing the question that could help others.
Question:
Stripe processes billions of dollars in payments per day, but not all of these payments are legitimate. Sometimes, the purchase is made without the end user's authorisation using stolen bank info, and in other cases, the end user was charged more than they had originally agreed to pay. in these cases, the end user can go to the bank and file a chargeback on the transaction; the bank in turn sends this chargeback information to Stripe.

The chargeback is the first stage in the lifecycle of a dispute; in this programming exercise, your job is to extract relevant information about a dispute by parsing this chargeback information, so the dispute can then be surfaced to the merchant.

Part 1: Parsing valid network chargeback information

We first want to construct a simple parser that parses correct chargeback info that is easier for humans to read and digest. You will need to read the contents of one or more files and output the aggregated dispute information. In part 1, all input will be valid.

Part 2: Filter out invalid data

Sometimes the dispute data that networks send to us is corrupted and cannot be parsed into a neat dispute object to surface to the merchant. In this part, we'll be filtering out invalid rows.

Any one of the following conditions will make a chargeback row invalid: ignore this row only, and continue processing the rest of the file.

Part 3 : Filter out withdrawn disputes

Sometimes, chargebacks will be filed only to later be withdrawn from the user. In these cases, we should not include these chargebacks in the output arid instead only surface chargebacks that have not yet been withdrawn to the user.

If the same transaction ID appears in two valid rows sin files for the same network, where the appearance in the later dated file is listed with reason withdrawn, do not process either row.

Comments (6)