This is interesting. If you are leaving a store and someone asks for your receipt do you have the right to refuse? Seems to me once you are outside the store nobody can demand you show a receipt.
But there is something called “shopkeepers privilege” which means that the owner has the right to detain you while they are doing an investigation. But they can be liable for damages if they make a mistake.
But these laws vary state by state.
Here are some videos to watch. If you are prickly about your 4th Amendment rights then you might want to know the nuances.