It is narrated from Sayyiduna Abu Sa'id (may Allah be pleased with him) that a group of the Companions of the Prophet (peace and blessings be upon him) set out on a journey. They stopped at one of the tribes of the Arabs and asked them for hospitality, but they refused to host them. Their chief was stung by some harmful creature. They tried everything for him, but it did not benefit him. Some of them said: If you go to these people who have stopped here (the Companions, may Allah be pleased with them), perhaps one of them has something that can benefit the chief. So some of them said: "O people of the caravan! Our chief has been stung by some harmful creature; we have tried (everything) for him. Is there anyone among you who can relieve our chief?" A man among the group said: "Yes! I can perform ruqyah, but we asked you for hospitality and you refused, so I will not perform ruqyah until you fix a payment for me." They agreed on a portion of sheep as compensation. That Companion came to him, recited Surah al-Fatihah over him and spat (lightly) on him, until he recovered as if he had been freed from a rope. They paid them in full what had been agreed. One of them said: "Divide it (the payment)," but the one who had performed the ruqyah said: "Do not do so until we go to the Prophet (peace and blessings be upon him) and ask him about it." In the morning they came to the Messenger of Allah (peace and blessings be upon him) and related the story. The Messenger of Allah (peace and blessings be upon him) said: "How did you know that it is a ruqyah?" And he said: "You did well; divide it, and keep a share for me along with you."
This indicates that one becomes entitled to a payment through a stipulation.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللقطة / 12122