Abdullah bin Abbas reported,

A woman from Juhaynah came to the Prophet ﷺ and said, "My mother vowed to perform Hajj but did not do so before she died. Should I perform Hajj on her behalf?"He replied, "Yes, perform Hajj on her behalf. Tell me, if your mother had a debt, would you not pay it off? Pay back what is owed to Allah, for Allah is more deserving of fulfillment."

Azami 4761

Sahih

عن ابن عباس

أن امرأة من جهيئة جاءت إلى النبي ﷺ فقالت: إن أمي نذرت أن تحج فلم تحج حتى ماتت أفأحج عنها؟ قال: نعم حجي عنها، أرأيت لو كان على أمك دين أكنت قاضيته؟ اقضوا الله، فالله أحق بالوفاء.

الأعظمي 4761صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Obligation of Hajj, its virtue, and its conditions
Section
Hajj on behalf of the deceased
Numbering
Jami al-Kamil 4761 (2nd edition)
Azami 4761