Is it legal for the company to collect the deposit?

Legal analysis: It is illegal for an employer to collect a deposit from a worker. Workers can complain to the labor administrative department, and the employer will face punishment. If the employer is in arrears with wages and remuneration, it may complain to the labor administrative department. If the employer fails to pay after being ordered to do so by the labor administrative department, the employer also needs to pay compensation to the laborer. If there is any dispute about the amount, you can apply for labor arbitration.

Legal basis: People's Republic of China (PRC) Labor Contract Law.

Article 50 When the employer dissolves or terminates the labor contract, it shall issue a certificate of dissolution or termination of the labor contract, and go through the formalities for the transfer of the file and social insurance relationship for the employee within 15 days. Laborers shall handle the work handover according to the agreement of both parties. If the employing unit should pay economic compensation to the workers in accordance with the relevant provisions of this law, it should pay it when the work handover is completed. The employing unit shall keep the text of the dissolved or terminated labor contract for at least two years for future reference.

Article 89 If an employing unit violates the provisions of this Law and fails to issue a written certificate of dissolution or termination of the labor contract to the laborer, and is ordered by the labor administrative department to make corrections, thus causing damages to the laborer, it shall be liable for compensation.