Home loan just to prepay in a year?

I have inheritance money coming within a year.

I want to use it to buy a flat.

However the flat I want is only available to buy now. If I purchase it with a home loan, can I prepay the whole loan when I get my inheritance money eventually next year?

Will banks approve such a deal? Will all that prepay go towards principal and not interest?

I’m based in Delhi. Have a great credit score, good income.