> Billing and Accounts Payable will always seem like a "how could you mess that up?" problem to engineers, but it literally is difficult and complicated and rife with ways to very seriously and permanently fuck your relationship with your customer
Yep.
Over the years I've seen some pretty crazy payment related errors that you can't think is possible, like a 12+ year old publicly traded company who generates $60 million dollars a year and their business model is a platform that lets other people sell products, in other words their customers have their own customers and buying things with money through a hosted checkout page is a focal point of their business.
One bug was during this checkout flow:
- Open checkout page for product A and see a buy price of $99
- Open a new tab and visit product B's checkout page and see a buy price of $199
- Switch back to the first tab and buy product A for $99
- You get charged $199 and credited for purchasing product B
I was only the end user of such a system so I don't know what their code looked like but I'm guessing their checkout page had stuff stored in a session and the last page loaded new data in the session but it didn't match what was shown on the checkout page. That's a massive assumption but that's how I imagine it happened.