On the day of completion your solicitor will deduct agent fees, outstanding expenses and mortgage with the surplus being paid into your account.