Why Charging a Card and Updating Your Database Is Not Atomic (And How Systems Break)

What happens when your system crashes between payment and database updates — and how to design for recovery