Yeah you’re the ahole. Just because someone is a jerk doesn’t mean you’re supposed to be one too. In this case you don’t even know if they were being a jerk or if they’re just uneducated. If they don’t provide the ID and it’s a requirement for the sale, then don’t sell the item ask them to leave the store be polite don’t ever take it too far you did. If that was one of your employees you would fire them, so fire yourself and get away from the counter for a while.
The steps required to get your business set up properly so that you don’t pull your hair out depends on a couple of factors.
Which US state does the business operate in?
How many department managers do you employ?
Does the business utilize financial or managerial accounting? (If you aren’t sure the answer is most likely financial)