Hello,
No you are not legally required to pay the said amount, if the said amount is being asked from you against the terms of the employment. If however, they serve you with some notice of recovery then you can also move to the High Court challenging the same.
This advise is being given to you on the limited facts presented by you in the question.
Regards