legal ground
Article 562 of the Civil Code: The parties may terminate the contract through consultation. The parties may agree on the reasons for one party to terminate the contract. When the reasons for the termination of the contract arise, the creditor may terminate the contract. Article 563 of the Civil Code: In any of the following circumstances, the parties may terminate the contract: (1) The purpose of the contract cannot be achieved due to force majeure; (two) before the expiration of the time limit for performance, one party clearly indicated or indicated by his own behavior that he would not perform the main debt; (three) one party delays the performance of the main debt and fails to perform it within a reasonable period after being urged; (4) One of the parties delays the performance of debts or commits other breach of contract, which makes it impossible to achieve the purpose of the contract; (5) Other circumstances stipulated by law. For an indefinite contract whose content is to continue to perform debts, the parties may terminate the contract at any time, but they shall notify the other party before a reasonable time limit. Article 557 of the Civil Code: In any of the following circumstances, the creditor's rights and debts are terminated: (1) The debts have been performed; (2) The debts offset each other; (3) The debtor deposits the subject matter according to law. (4) Creditors are exempted from debts; (5) Creditor's rights and debts are owned by one person; (six) other circumstances stipulated by law or agreed by the parties to terminate. If the contract is terminated, the rights and obligations of the contract shall be terminated accordingly.