Legal action on job employment and resignation

Hi, I joined a company on 27th April 2021. Due to some medical emergency of family I have to take leave and travel to my native. I informed the same to my reporting HR on 5th May 2021. After knowing the medical situation of my family I decided to discontinue my services same I communicated to the reporting HR on 9th May 2021 and submitted my resignation mail. After 20 days I got a email saying that I have not informed the organization and took a long day leave. I replied the email as I have already communicated my issue of not continuing my services. Later I came to know that company has credited my salary. As I have not worked a single day and not going to continue further I asked the HR to revert the salary back to company. They agreed that and asked me to wait for the payroll team to revert back. Later after 20 days i.e 23th June 2021 they asked me to send the scan documents of the health issues of my family members. Later after 2 days I received an email where it was mentioned to pay the salary along with the payment of notice period. When in the initial communication they didnot inform about the notice period. Please suggest me the exact procedure to handle this issue. Thanks in advance.