You can't refuse legal tender as payment for a debt, regardless of the terms of your contract, and then expect the court system to enforce your contract.
You don't have to accept legal tender for a sale, but once a debt exists you'll only get to use the government's enforcement powers if you don't refuse legal tender.