Halacha

הלכה א
הַמַּלְוֶה אֶת חֲבֵרוֹ בְּעֵדִים וְאָמַר אַל תִּפְרָעֵנִי אֶלָּא בְּעֵדִים בֵּין שֶׁאָמַר לוֹ בִּשְׁעַת הַלְוָאָה בֵּין שֶׁאָמַר לוֹ אַחַר שֶׁהִלְוָהוּ הֲרֵי זֶה צָרִיךְ לְפָרְעוֹ בְּעֵדִים מִפְּנֵי הַתְּנַאי. טָעַן הַלּוֶֹה וְאָמַר לוֹ וְכֵן עָשִׂיתִי וּפְרַעְתִּיךָ בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי וְהָלְכוּ לָהֶם לִמְדִינַת הַיָּם אוֹ מֵתוּ הֲרֵי זֶה נֶאֱמָן וְנִשְׁבָּע שְׁבוּעַת הֶסֵּת וְנִפְטָר. וְכֵן אִם אָמַר אַל תִּפְרָעֵנִי אֶלָּא בִּפְנֵי תַּלְמִידֵי חֲכָמִים אוֹ בִּפְנֵי רוֹפְאִים וְאָמַר לוֹ בִּפְנֵיהֶם פְּרַעְתִּיךָ וְאוֹתָן הָעֵדִים שֶׁפְּרַעְתִּיךָ בִּפְנֵיהֶם מֵתוּ אוֹ הָלְכוּ לָהֶם לִמְדִינַת הַיָּם הֲרֵי זֶה נֶאֱמָן וְנִשְׁבָּע הֶסֵּת וְנִפְטָר. אֲבָל אִם אָמַר לוֹ אַל תִּפְרָעֵנִי אֶלָּא בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי וְאָמַר לוֹ פְּרַעְתִּיךָ בִּפְנֵי אֲחֵרִים וּמֵתוּ אוֹ הָלְכוּ לָהֶם לִמְדִינַת הַיָּם אֵינוֹ נֶאֱמָן שֶׁמִּפְּנֵי טַעֲנָה זוֹ הִתְנָה עָלָיו וְאָמַר לוֹ אַל תִּפְרָעֵנִי אֶלָּא בִּפְנֵי רְאוּבֵן וְשִׁמְעוֹן שֶׁהֵם עוֹמְדִים עִמּוֹ כְּדֵי שֶׁלֹּא יִדְחֶה אוֹתוֹ וְיֹאמַר בִּפְנֵי אֲחֵרִים פָּרַעְתִּי וְהָלְכוּ לָהֶם:
כסף משנה
1.
When a person lends money to a colleague in the presence of witnesses and tells the borrower: "Do not repay me outside the presence of witnesses," the borrower must repay him in the presence of witnesses because of this stipulation. This applies whether he made this stipulation at the time the loan was given or after the loan was given.
If the borrower claims: "I fulfilled the stipulation and repaid you in the presence of so-and-so and so-and-so, and they journeyed overseas or died," his word is accepted. He may take a sh'vuat hesset, and then he is freed of responsibility.
Similarly, if the lender states: "Repay me only in the presence of Torah scholars," or "... in the presence of doctors," and the borrower claims: "I repaid you in their presence, but those witnesses in whose presence I repaid you died or journeyed overseas," his word is accepted. He may take a sh'vuat hesset, and then he is freed of responsibility.
If, however, the lender stipulates: "Do not repay me except in the presence of so-and-so and so-and-so and so," and the borrower claims: "I repaid you in the presence of other witnesses, and they died or journeyed overseas," his word is not accepted. Indeed, the lender stipulated: "Do not pay me except in the presence of Reuven and Shimon," who are standing with him, so that the borrower will not rebuff him, saying: "I repaid you in the presence of other people, and they journeyed away."

הלכה ב
יֵשׁ נֻסְחָאוֹת מִן הַגְּמָרָא שֶׁכָּתוּב בָּהֶן שֶׁהָאוֹמֵר לַחֲבֵרוֹ אַל תִּפְרָעֵנִי אֶלָּא בְּעֵדִים וְאָמַר לוֹ פְּרַעְתִּיךָ בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי וְהָלְכוּ לִמְדִינַת הַיָּם אֵינוֹ נֶאֱמָן וְטָעוּת סְפָרִים הוּא וּלְפִיכָךְ טָעוּ הַמּוֹרִים עַל פִּי אוֹתָן הַסְּפָרִים וּכְבָר חָקַרְתִּי עַל הַנֻּסְחָאוֹת הַיְשָׁנוֹת וּמָצָאתִי בָּהֶן שֶׁהוּא נֶאֱמָן וְהִגִּיעַ לְיָדִי בְּמִצְרַיִם מִקְצָת גְּמָרָא יְשָׁנָה כָּתוּב עַל הַגְּוִילִים כְּמוֹ שֶׁהָיוּ כּוֹתְבִין קֹדֶם לַזְּמַן הַזֶּה בְּקָרוֹב חֲמֵשׁ מֵאוֹת שָׁנָה וּשְׁתֵּי נֻסְחָאוֹת מָצָאתִי מִן הַגְּוִילִים בַּהֲלָכָה זוֹ וּבִשְׁתֵּיהֶם כָּתוּב וְאִם אָמַר פָּרַעְתִּי בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי וְהָלְכוּ לָהֶן לִמְדִינַת הַיָּם נֶאֱמָן. וּמִפְּנֵי טָעוּת זוֹ שֶׁאֵרַע לְמִקְצָת הַסְּפָרִים הוֹרוּ מִקְצָת גְּאוֹנִים שֶׁאִם אָמַר לוֹ אַל תִּפְרָעֵנִי אֶלָּא בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי וּפְרָעוֹ בִּפְנֵי אֲחֵרִים שֶׁאֵינוֹ נֶאֱמָן אַף עַל פִּי שֶׁהֵבִיא עֵדִים שֶׁפָּרְעוּ בִּפְנֵיהֶם וְגַם זוֹ טָעוּת גְּדוֹלָה וְהַדִּין הָאֱמֶת שֶׁאִם בָּאוּ עֵדִים שֶׁפָּרְעוּ בִּפְנֵיהֶם נִפְטָר וְאֵין כָּאן מְקוֹם חֲשָׁשׁ. גַּם הַהוֹרָאָה הַזֹּאת עַל פִּי סִפְרֵיהֶן שֶׁכָּתוּב בָּהֶן בְּאוֹתוֹ שֶׁאָמַר לַחֲבֵרוֹ פְּרָעֵנִי בִּפְנֵי עֵדִים שֶׁשָּׁנוּ הֲלָכוֹת וְהָלַךְ וּפְרָעוֹ בִּפְנֵי עֵדִים וְטָעוּת סְפָרִים הוּא וּמָצָאתִי בַּגְּוִילִים כָּתוּב אָזַל פַּרְעֵיהּ בֵּינֵיהּ לְבֵין דִּילֵיהּ אַף עַל פִּי שֶׁהַסְּפָרִים מֻגָּהִין כְּמוֹ שֶׁבֵּאַרְנוּ כָּךְ יֵרָאֶה מִדִּין הַגְּמָרָא. וְעוֹד דְּבָרִים שֶׁל דַּעַת הֵן וְכִי מֶה הָיָה לוֹ לַעֲשׂוֹת אָמַר לוֹ אַל תִּפְרָעֵנִי אֶלָּא בְּעֵדִים פְּרָעוֹ בְּעֵדִים וְכִי יֵשׁ לוֹ לֶאֱסֹר אֶת הָעֵדִים בְּבֵית הַסֹּהַר כָּל יְמֵיהֶם שֶׁלֹּא יֵלְכוּ וְעוֹד אִם מֵתוּ מַה יַּעֲשֶׂה נִמְצָא זֶה פּוֹרֵעַ פַּעַם אַחַר פַּעַם לְעוֹלָם עַד שֶׁיָּבִיא עֵדִים אִם כֵּן נַעֲשֵׂית עֵדוּת זוֹ עֵדוּת בִּשְׁטָר וְנִמְצָא זֶה כֵּיוָן שֶׁאָמַר אַל תִּפְרָעֵנִי אֶלָּא בְּעֵדִים נַעֲשֵׂית מִלְוֶה בִּשְׁטָר וְאֵין מִי שֶׁעָלָה עַל לִבּוֹ זֶה. אֲבָל וַדַּאי אִם אָמַר בִּפְנֵי פְּלוֹנִי וּפְלוֹנִי הוּא הִפְסִיד עַל עַצְמוֹ שֶׁפָּרַע בִּפְנֵי אֲחֵרִים וְהָלְכוּ לָהֶם. אֲבָל אִם בָּאוּ וְהֵעִידוּ שֶׁפְּרָעוֹ אֵין כָּאן בֵּית מֵחוֹשׁ וְכָזֶה רָאוּי לָדוּן וּלְהוֹרוֹת:
כסף משנה
2.
There are versions of the Talmud that state that when a person tells a colleague: "Do not repay outside the presence of witnesses," and the borrower claims: "I fulfilled the stipulation and repaid you in the presence of so-and-so and so-and-so, and they journeyed overseas or died," his word is not accepted. This is a scribal error. For this reason, the halachic authorities erred because of those texts. I have researched ancient versions of the text and I found that they state that the borrower's word is accepted. In Egypt, a portion of an ancient text of the Talmud written on parchment, as was the custom in the era approximately 500 years before the present era, came to my possession. I found two versions of this law among those parchments. Both state: "If he claims: 'I fulfilled the stipulation and repaid you in the presence of so-and-so and so-and-so, and they journeyed overseas or died,' his word is accepted."
Because of the error that occurred with regard to some texts, there are several Geonim who ruled that if the lender stipulates: "Do not repay me except in the presence of so-and-so and so-and-so," and the borrower repaid him in the presence of others, the borrower's word is not accepted even if he brought witnesses, and they testify that he paid him in their presence. This is also a great mistake. The true law is that if witnesses come and testify that he paid the lender in their presence, the borrower is freed from responsibility; there is no place for suspicion.
This ruling also stems from those texts that state with regard to a lender who tells his colleague: " 'Repay me in the presence of witnesses who study Torah law,' and the borrower repaid him in the presence of ordinary witnesses...." This is also a scribal error. In the above-mentioned parchments, I found it written: "And he went and paid him in private."
Although these texts have been carefully edited, this appears to be the ruling based on the judgment of the Talmud. Moreover, these concepts make sense: "What should the borrower do? The lender told him: "Do not repay me except in the presence of witnesses," and he repaid him in the presence of witnesses. Should he have locked the witnesses in prison for their entire lives so that they do not depart? Besides, what could he do if they died? Thus, the borrower will be forced to pay the lender time after time until he brings witnesses to court. This makes this testimony equivalent to testimony recorded in a legal document. Thus, by saying: "Do not repay except in the presence of witnesses," the lender endows the loan with the strength of a loan recorded in a promissory note. There is no one who would think that this is correct.
Instead, certainly, if the lender stipulated: "Do not repay me except in the presence of so-and-so and so-and-so," the borrower caused himself a loss if he repaid the loan in the presence of other witnesses who departed. If, however, these witnesses come and testify that he repaid the debt, there is no question that the borrower should not be held responsible. This is the manner in which judgment should be rendered and instruction should be given.

הלכה ג
הִתְנָה הַמַּלְוֶה עַל הַלּוֶֹה שֶׁיִּהְיֶה נֶאֱמָן בְּכָל עֵת שֶׁיֹּאמַר שֶׁלֹּא פְּרָעוֹ הֲרֵי זֶה נוֹטֵל בְּלֹא שְׁבוּעָה אַף עַל פִּי שֶׁטָּעַן שֶׁפְּרָעוֹ. וְאִם הֵבִיא עֵדִים שֶׁפְּרָעוֹ אֵינוֹ נוֹטֵל כְּלוּם:
כסף משנה
3.
If the lender had the borrower agree to the stipulation that the lender's word would be accepted whenever he claimed that the borrower did not pay him, he may collect the debt without taking an oath. This applies even though the borrower claims that he paid him. If, however, the borrower brings witnesses who testify that he paid him, the lender is not entitled to expropriate any funds.

הלכה ד
הִתְנָה עָלָיו שֶׁיִּהְיֶה הַמַּלְוֶה נֶאֱמָן כִּשְׁנֵי עֵדִים אַף עַל פִּי שֶׁהֵבִיא עֵדִים שֶׁפְּרָעוֹ הֲרֵי זֶה גּוֹבֶה מִמֶּנּוּ בְּלֹא שְׁבוּעָה שֶׁהֲרֵי הֶאֱמִינוֹ כִּשְׁנֵי עֵדִים. וַאֲפִלּוּ הֵבִיא מֵאָה עֵדִים (שֶׁפְּרָעוֹ הֲרֵי גּוֹבֶה מִמֶּנּוּ בְּלֹא שְׁבוּעָה וַאֲפִלּוּ הֵבִיא מֵאָה עֵדִים) שֶׁפְּרָעוֹ בִּפְנֵיהֶם שֶׁהַשְּׁנַיִם כְּמֵאָה. אֲבָל אִם אָמַר לוֹ הֲרֵי אַתָּה נֶאֱמָן עָלַי כִּשְׁלֹשָׁה הוֹאִיל וְיָרַד לְמִנְיָן אִם פְּרָעוֹ בִּפְנֵי אַרְבָּעָה הֲרֵי זֶה פָּרוּעַ. זֶה שֶׁהֶאֱמִין הַמַּלְוֶה כִּשְׁנֵי עֵדִים מַה תִּהְיֶה תַּקָּנָתוֹ כְּשֶׁיִּפָּרַע יִקְרַע הַשְּׁטָר אוֹ יָעִיד זֶה הַמַּלְוֶה עַל עַצְמוֹ שֶׁבִּטֵּל כָּל שְׁטָר שֶׁיֵּשׁ לוֹ עַל פְּלוֹנִי. אוֹ יָעִיד עַל עַצְמוֹ שֶׁלֹּא בִּפְנֵי הַלּוֶֹה שֶׁקִּבֵּל כָּל חוֹב שֶׁיֵּשׁ לוֹ אֵצֶל פְּלוֹנִי:
כסף משנה
4.
If the lender had the borrower agree to the stipulation that the lender's word would be accepted as the testimony of two witnesses, even if the borrower brings witnesses who testify that he paid him, he may collect the debt without taking an oath. For he accepted his word as that of two witnesses. ) This law applies even if the borrower brought 100 witnesses that he paid the lender, for the legal power of two witnesses is the same as that of 100 witnesses.
If, however, the borrower told the lender: "I accept your word as that of three witnesses," since he mentioned a number, if the borrower pays the lender in the presence of four witnesses, we consider the debt to be paid. When a person accepted the lender's word as equivalent to that of two witnesses, how can he correct the matter? When he pays, he should have the promissory note ripped up, the lender testify that he nullifies every promissory note he has against so-and-so, the borrower, or the lender give testimony against himself outside the presence of the borrower that he received payment for all debts owed to him by so-and-so the borrower.

הלכה ה
הֲרֵי שֶׁפְּרָעוֹ וְטָעַן הַמַּלְוֶה שֶׁלֹּא נִפְרַע וּפְרָעוֹ פַּעַם שְׁנִיָּה מִפְּנֵי הַתְּנַאי הֲרֵי הַלּוֶֹה חוֹזֵר וְתוֹבֵעַ אֶת הַמַּלְוֶה בְּדִין וְאוֹמֵר לוֹ כָּךְ וְכָךְ אַתָּה חַיָּב לִי מִפְּנֵי שֶׁפְּרָעְתִּיךָ שְׁתֵּי פְּעָמִים. אִם הוֹדָה יְשַׁלֵּם וְאִם כָּפַר יִשָּׁבַע שְׁבוּעַת הֶסֵּת עַל כָּךְ שֶׁלֹּא פְּרָעוֹ אֶלָּא פַּעַם אַחַת. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
5.
If the borrower pays the lender, the lender claims that he was not paid, and the borrower paid him a second time because of the stipulation, the borrower can lodge a suit against the lender claiming: "You owe me such and such, because I paid you twice." If the lender acknowledges the borrower's claim, he must repay him. If he denies the claim, he is required to take a sh'vuat hesset, stating that the borrower paid him only once. Similar principles apply in all analogous situations.

הלכה ו
הִתְנָה הַלּוֶֹה שֶׁיִּהְיֶה נֶאֱמָן בְּכָל עֵת שֶׁיֹּאמַר פָּרַעְתִּי אֵינוֹ גּוֹבֶה בִּשְׁטָר זֶה לֹא מִן הַיּוֹרֵשׁ וְלֹא מִן הַלּוֹקֵחַ. וַאֲפִלּוּ אָמַר לוֶֹה לֹא פָּרַעְתִּי אֵין הַמַּלְוֶה טוֹרֵף בִּשְׁטָר זֶה מִן הַלָּקוֹחוֹת שֶׁמָּא עָשׂוּ קְנוּנְיָא עַל נְכָסָיו שֶׁל זֶה. טָעַן הַלּוֶֹה בִּשְׁטָר זֶה וְאָמַר פָּרַעְתִּי מִקְצָתוֹ וְהַמַּלְוֶה אוֹמֵר לֹא פָּרַע כְּלוּם מְשַׁלֵּם הַמִּקְצָת שֶׁהוֹדָה בּוֹ וְנִשְׁבָּע שְׁבוּעַת הֶסֵּת שֶׁהֲרֵי הֶאֱמִינוֹ. וְאִם הִתְנָה עָלָיו שֶׁיִּהְיֶה נֶאֱמָן בְּלֹא שְׁבוּעַת הֶסֵּת אֵינוֹ נִשְׁבָּע:
כסף משנה
6.
When the borrower had the lender agree to the stipulation that the borrower's word would be accepted whenever he claimed that he paid the debt, the lender may not collect this debt on the basis of this promissory note - neither from the borrower's heir, nor from a person who purchased property from him. Moreover, even if the borrower said: "I did not pay this debt," the lender may not use this promissory note to expropriate property from a person who purchased property from the borrower. The rationale is that we suspect that the lender and the borrower perpetrated an act of deception to take the purchaser's property.
If the borrower claims to have paid a portion of the debt recorded in this promissory note, and the lender claims that he did not pay anything, the borrower is required to pay the portion that he admitted to owing. With regard to the remainder, he is required to take a sh 'vuat hesset. The rationale is that the lender accepted his word. If he originally stipulates that his word would be accepted without having to take a sh'vuat hesset, he is not required to take that oath.

הלכה ז
הִתְנָה הַמַּלְוֶה שֶׁיִּהְיֶה גּוֹבֶה בְּלֹא שְׁבוּעָה הֲרֵי זֶה גּוֹבֶה מִמֶּנּוּ בְּלֹא שְׁבוּעָה. אֲבָל אִם בָּא לִגְבּוֹת מִיּוֹרְשָׁיו יִשָּׁבַע וְאַחַר כָּךְ יִגְבֶּה. וְאִם הִתְנָה שֶׁיִּגְבֶּה אַף מִן הַיּוֹרֵשׁ בְּלֹא שְׁבוּעָה גּוֹבֶה בְּלֹא שְׁבוּעָה. וְכֵן אִם הִתְנָה שֶׁיִּגְבֶּה מִן הָעִידִית גּוֹבֶה מִן הָעִידִית אַף מִן הַיּוֹרְשִׁין. שֶׁכָּל תְּנַאי שֶׁבְּמָמוֹן קַיָּם. בָּא לִגְבּוֹת מִן הַלּוֹקֵחַ לֹא יִטְרֹף אֶלָּא בִּשְׁבוּעָה שֶׁאֵין זֶה מַתְנֶה לְאַבֵּד מָמוֹן חֲבֵרוֹ:
כסף משנה
7.
If the lender stipulates that his word will be accepted without his having to take an oath, he may collect the debt without taking an oath. If, however, he must collect the debt from the borrower's heirs, he must take an oath; only afterwards may he collect the debt. If, however, he stipulated that he would also be able to collect from the heirs without taking an oath, he may collect the debt from them without an oath.
Similarly, if the lender stipulates that he will be able to expropriate the most valuable property owned by the borrower, he may expropriate that property, even from the heirs. The rationale is that any stipulation made with regard to financial matters is binding.
If the lender comes to collect from a person who purchased property from the borrower, he may expropriate the property only after taking an oath. The rationale is that the borrower may not accept a stipulation that will cause a colleague a loss.

משפטים הלכות מלווה ולווה פרק טו
Mishpatim Malveh and Loveh Chapter 15