A person who can perform Hajj by borrowing money is not able to perform Hajj, even if he can pay later his whole debt at once or by installments, unless he has assets that can pay his debt from them easily.
Hajj is one of the greatest worships that one can borrow money for, and there are hadiths by the infallibles regarding the permissibility of borrowing for it in hadith sources.[1]
Another issue that arises here is that since financial capability is one of the conditions of this worship becoming obligatory, will a hajj performed out of getting a loan count as the hajj that is mandatory for everyone to perform once in their lifetime? In other words, does this hajj count as the wajib hajj?
The view of many of the maraje’ regarding this question is as follows:
If one can’t afford to perform hajj, and borrows money for it, he still won’t be considered [religiously] capable, even if he can easily pay back the loan later.[2] If he performs hajj with it, it won’t suffice for his Hajjatul-Islam [the wajib hajj].[3] Of course, some marja’s, such as Ayatullahs Khu’i, Golpaygani, Fazel Lankarani, Khamene’i, Safi Golpaygani, and Zanjani believe that if someone borrows enough money to afford going to hajj and can easily repay the money, hajj will become wajib upon him.
——————————————————————————————————————————–
References
[1] Kuleini, Muhammad bin Yaqub, Kafi, vol.4, Dar al-Kutub al-Islamiyyah, Tehran, 1365 (solar).
[2] Imam Khomeini’s viewpoint, see: Manasek Hajj (annotated by Imam Khomeini), pg. 35, Mash’ar Publications, Tehran, 1380 (solar).
[3] Manasek Hajj (annotated by Imam Khomeini), pg. 25, issue 20.