You have to pay the legal fees in advance before you can sue, and the legal fees will be borne by yourself. If the other party loses the case, the legal fees will be given to you.
The Measures for Payment of Litigation Fees stipulates that:
The case acceptance fee shall be paid in advance by the plaintiff, the third party with independent claim and the appellant.
The litigation costs shall be borne by the losing party, unless the winning party voluntarily bears them.
After the case is concluded, the people's court shall notify the parties in writing of the detailed list of litigation costs and the amount to be borne, and specify the amount to be borne by the parties in the written judgment, ruling or conciliation statement.
If it is necessary to refund the litigation costs of the parties, the people's court shall refund the parties within 05 days from the date when the legal documents take effect.
Legal fees are generally borne by the losing party, and legal fees are paid by the party who invites a lawyer. However, in civil and commercial cases, when one party becomes the defendant, if a lawyer is hired to defend it and the plaintiff wins the case, the plaintiff can be required to pay this fee (the law supports one party to pay the necessary fees paid by the other party for the trial of the case).
It is a common rule and common sense that the litigation costs should be borne by the losing party in principle. Due to the different nature of the case, the outcome of the lawsuit may be divided into winning and losing, and there may be some exceptions to the principle that the losing party bears the legal fees. For example, in a divorce case, whether it is a divorce or not, there is no difference between victory and defeat. Therefore, according to the law, the burden of litigation costs in divorce cases should be settled by both parties through consultation. If negotiation fails, the court will decide.
To sum up, the legal costs shall be borne by the losing party.
Legal basis:
Measures of the People's Republic of China on Payment of Litigation Costs
Article 29
The litigation costs shall be borne by the losing party, unless the winning party voluntarily bears them.
If the case is partially won or partially lost, the people's court shall decide the amount of litigation costs borne by the parties according to the specific circumstances of the case.
* * * If the parties lose the case, the people's court shall decide the amount of litigation expenses to be borne by each party according to the interest relationship between the parties and the litigation object.