Illegal.
According to the provisions of Article 13, paragraph 1, of the "Regulations of the Supreme People's Court on Several Issues Concerning the Application of Law in the Trial of Private Lending Cases", if a loan from a financial institution is obtained and transferred, the private lending contract shall be invalid. Using a credit card to repay a private loan is equivalent to cashing out and is illegal.
Taking loans from financial institutions and re-lending will not only lead to the invalidation of the loan contract and the inability to claim the agreed interest from the borrower, but also serious extortion of credit funds for high-interest re-lending, which may result in larger profits. It constitutes the crime of refinancing at high interest rate.