I don’t think you should try to avoid paying money back to a disgruntled customer. There is an old saying that the customer is always right. One disgruntled customer can ruin a reputation that may have taken you years to build. A really disgruntled customer will stop at nothing to bad mouth you and your product(s). They will talk about their unhappiness on social media. They will write bad reviews on every website they can access.
They will make your life miserable. In the grand scheme of things, it’s a whole lot easier to just refund the customer’s money, regardless if it’s partially the customer’s fault.