Donald Trump is open to a US company buying TikTok, but says his government should be paid for clearing a deal.