When renting any type of property in Shanghai you will be asked to pay a security deposit, this amount can be anywhere from one to three months additional rental fee upfront. And this is to be used if you damage the apartment beyond general wear and tear and will be taken by the landlord if you break the contract early or flee the city without paying.
On the day of signing your 12 months or longer contract you will be handing over a large sum of money to the landlord, who will then pay or atleast should pay the agents fee which they are usually reluctant to do as this amount is sometimes one month’s rental worth. (The agent should provide all the contracts and documentation in both English and Chinese although the Chinese copy will be the legally binding version.)
With the remainder of the first few months rental and your security deposit they have been known to put it into the Shanghai stock market, go on a shopping spree and then forget about it for 12 months, until the contract is up and its time for them to pay you back.
Some landlords might not be able to bring themselves to returning your security deposit that they possibly invested and lost in the stock market or spent it on something they no longer value, or they simply dont have that money available at that moment in time.
I have known of landlords who disappear hoping the tenant will leave the apartment and forget about the deposit, others have been known to inflate repair costs and exaggerate any damage made to the apartment in a attempt to make reductions in the amount they need to return to you.
Basically they will pull all the strings and tricks they can do avoid repaying your deposit.
Now if you have used a reliable agent they first should have checked the landlords background to see if they have returned tenants deposits in the past and secondly they should be still around when the lease ends to help negotiate with the landlord for the return of the security deposit and most importantly have provided all of the legal contracts and documentations.
My advice to ensure you do not lose your security is to have the contract state that the final months of the lease are to be deducted from the security deposit, this means if you paid 3 months security deposit in advance that you will stop paying rent for the remainder of the final three months of the lease.
Also try to get the landlord to agree on just one months deposit and three months upfront, with subsequent payments every three months, in advance.
If this is not stated in the contract, the landlord might try and cause some troubles if you simply stop paying rent for the final months of your stay.