That toggable option isn't a good idea in my opinion, because sometimes you are being chased / in a fight and you need to buy very fast, so the toggle would just be annoying. In other situations it would be useful, so you can't really 'like or don't like' the toggle.
How can it be abused by the way? The only thing I can think of is buying a compass to see someone and then selling it again...
I mentioned it only being viable for high-tier items such as diamond armor. How often are you getting chased and needing to buy diamond armor or maximum enchanted weapons quickly? Obviously it wouldn't be implemented for things like golden apples or blocks.
How do you think this would get abused? If things that were mentioned before would be added that would be impossible (timers, full durability, only if you have 2 of that specific item)
Countless ways it could be abused. Consider that you buy full diamond armor, then realize the last hostile player alive only has leather armor, diamond armor would be kinda overkill. So you could sell your diamond armor back for a full refund giving you enough to buy an enderpearl and full iron armor, plus extra. That's one example, but there are many more ways it can be abused even if we add timers to how quickly you can refund something.
If we made it so you'd need two of the same items in your inventory to refund it that could work in theory, but are we talking about refunding any item or only high-tier items? This would also require a bunch of development time for a system like this to work sufficiently.