Stripe Interview Question

How would you solve this differently.