For the downvoters, I do not know why:
This is actually percisely one of the main ingredients of a "(whatever) free market" - to put in a contract what you want as long as it is not against the law.
?