'Ali (May Allah be pleased with him) reported:
A slave who had made a contract with his master to pay for his freedom, came to me and said: "I am unable to fulfill my obligation, so help me." He said to him: "Shall I not teach you a supplication which the Messenger of Allah (ﷺ) taught me? It will surely prove so effective that if you have a debt as large as a huge mountain, Allah will surely pay it for you. Say: 'Allahumm-akfini bihalalika 'an haramika, wa aghnini bifadlika 'amman siwaka (O Allah! Grant me enough of what You make lawful so that I may dispense with what You make unlawful, and enable me by Your Grace to dispense with all but You)."[At- Tirmidhi].
App reference: Book 17, Hadith 22
Arabic/English book reference: Book 17, Hadith 1486