Company: Stripe_16july
Difficulty: medium
Payment Intent System Background A payment platform processes payments for merchants through many different payment methods -- cards, bank debits, even paper cheques. Merchants should not have to care about the details of each method. Some payments settle instantly; others take days and may still be declined. The platform hides all of that behind one small object called a Payment Intent , which tracks a single payment as a state machine. A Payment Intent stores the merchant receiving the payment, a monetary amount, and its current state. There are exactly three states: REQUIRES_ACTION -- the initial state of a Payment Intent upon creation. It can transition to PROCESSING. PROCESSING -- the customer has attempted to pay, but the attempt has not yet succeeded or failed. It can transition to either REQUIRES_ACTION or COMPLETED. COMPLETED -- the attempt to pay succeeded, and the Payment Intent's amount has been added to the merchant's balance. Your Task Execute a chronologically ordered li