BORROWING AND PAYING BACK ON SHABBOS [Shabbos: Halva'ah]
Gemara
148b (Mishnah): Reuven may be Sho'el (borrow) barrels of wine or oil from his friend, as long as he does not say 'Halveni' (lend to me);
If the lender does not trust Reuven, Reuven leaves his Talis with him, and they calculate after Shabbos [the value of what was lent].
Similarly, when Erev Pesach is on Shabbos, one [who needs to buy Korban Pesach] leaves his Talis with the seller, and they make a calculation after Yom Tov.
Question (Rava bar Rav Chanan): What is the difference whether he says 'Hash'ileni' or 'Halveni'?
Answer (Abaye): If he says 'Halveni', the lender is prone to write [details of the loan]. If he says 'Hash'ileni', we are not concerned lest he write.
149a, and Bava Metzi'a 75a (Shmuel): If people lend to each other and are insistent to get back no less than they gave, they transgress lending and repaying on Yom Tov [or Shabbos].
Kesuvos 7a: A case occurred in which R. Ami permitted Bi'ah Rishonah on Shabbos.
Question (Rabanan): A Kesuvah was not written!
Answer (R. Ami): She should seize movable objects [for a security, until he writes a Kesuvah].
Rishonim
Rambam (Hilchos Shabbos 23:12): On Shabbos one may not be Loveh or Malveh (borrow or lend things like money, in which the same item is not returned). This is a decree lest one write. One may be Sho'el flasks of wine and oil, as long as he does not say 'Halveni.'
Rosh (Teshuvah 8:16): If Reuven swore to pay Shimon 100 Zuz on a certain day [of the month], and it fell on Shabbos, he gives a security on Shabbos to fulfill his oath, for this is Cheftzei Shamayim. This is no less than arranging a Shiduch for a daughter, for someone to teach a trade to his son. All the more so one may pay on Shabbos to fulfill his oath! If he swore to give money, and not a security, it is a valid oath, for he did not know that the day will be Shabbos.
Ran (63a DH Gemara): Rashi (148a) explains that when he says 'Halveni', the lender is prone to write, for a Stam Halva'ah is 30 days (Makos 3b). This implies that She'elah has no fixed time. The lender may take back his item whenever he wants. Therefore, one must say Hash'ileni. Even though he does not return the same item he borrowed, and it is proper to call this Halva'ah, and not She'elah, he means 'I will return it to you whenever you want, like a She'elah.'
Tosfos (Bava Metzi'a 75a DH u'Mishum): One may not say an expression of Halva'ah or Pri'ah (payment). Rather, one mentions She'elah and Chazarah (returning). The people [who lend to each other and are insistent...] do not want to mention She'elah, for this connotes that the same item will be returned. They fear lest the lender demand it back immediately.
Ran (Kesuvos 2a DH Atfesuha): Why was it permitted to give a security for the Kesuvah on Shabbos? Kinyan is forbidden on Shabbos (Beitzah 17a)! It was permitted for a Mitzvah (Gitin 77b), unless it is very publicized (Yerushalmi). Alternatively, she seized the Metaltelim before Shabbos. There was no time to write a Kesuvah before Shabbos.
Rivash (156): One may not do Pidyon ha'Ben on Shabbos. It is no less than paying a debt, which we do not do on Yom Tov, and all the more so on Shabbos. Just like we decree not to lend, lest he write, we decree not to pay.
Poskim
Shulchan Aruch (OC 307:11): One who borrows from his friend on Shabbos may not say 'Halveni', which connotes a long time, so there is concern lest he write. Rather, he says "Hash'ileni."
Magen Avraham (14): Here, the custom is that one may demand a Stam loan immediately, so one may say Halveni.
Question (Bi'ur Halachah DH li'Zman): The Gemara required a change of expression to remind him not to write! The Gra (below) says so.
Magen Avraham (14): The Gemara connotes that it is permitted only for wine and oil, which are needs of Shabbos. If it is not needed for Shabbos, one may not leave a security. See what I wrote in 306:15 (below). We permit only for Korban Pesach, eating and drinking. The Ran (Kesuvos 2a) connotes like this.
Mishnah Berurah (43): The Pri Megadim brings that the Rashba forbids saying Halva'ah, even if he stipulates for a short time, for Rabanan did not distinguish. The Pri Megadim forbids saying Halveni even to borrow Seforim, which is a Mitzvah.
Kaf ha'Chayim (82) Tosefes Shabbos (26) permits borrowing for a long time if he says Hash'ileni. Eshel Avraham was unsure. Therefore, it is good not to mention that it is for a long time.
Shulchan Aruch (ibid.): In other languages, which do not distinguish the two kinds of loans, one must say "give to me."
Beis Yosef (DH v'Chasav): R. Peretz said that in other languages, there is no difference. He did not say whether it is permitted or forbidden. The Ran (63a DH Aval) brings from Tosfos that one must say 'give to me' or something similar. Semag agrees.
Gra (DH uv'Leshon): The Gemara connotes like this. It permits Hash'ileni only because this is unlike one says during the week.
Kaf ha'Chayim (83): The Rashba says that also women may not use an expression of loan [even in Leshon ha'Kodesh], for they do not know the difference between Halva'ah and She'elah.
Taz (9): One may conclude 'and I will return to you.' The primary Isur is lest one write. We are concerned only regarding Halveni, which connotes a long time.
Rema: When one borrows on Shabbos and the lender does not trust the borrower, he leaves a security with him. He may not say 'here is a security', for this is Uvda d'Chol (a weekday action).
Source: Rashba (Avodas ha'Kodesh Beis Mo'ed 2:5, cited in Beis Yosef DH Kasuv), Ran (63a DH Aval, citing Tosfos).
Rema (ibid.): Just like we are not Loveh on Shabbos, we do not pay up on Shabbos.
Beis Yosef (DH Kasuv): Orchos Chayim (Hilchos Shabbos 181) says that he leaves his Talis with him, and makes a calculation after Shabbos.
Magen Avraham (15): The Rivash (156) forbids Pidyon ha'Ben on Shabbos, for one may not pay a debt on Yom Tov. Tosfos (75a) forbids saying an expression of Halva'ah or Pri'ah, but permits She'elah and Chazarah. This is only for food needed for Shabbos. If not, it is forbidden in any expression.
Mishnah Berurah (46): Even if he lent flasks of wine and oil for a long time, one may not repay on Shabbos. Just like we decree not to lend, lest he write, we decree not to pay, lest he erase the debt from his ledger. Tosfos permits with an expression of returning, but not paying, for there is a Heker (reminder), so he will not erase.
Magen Avraham (306:15): The Ritva connotes that one may not even give a security for Chulin. Yalkut Shimoni (Beha'aloscha 720 DH v'Ya'asu (2)) connotes like this. It lists giving a security and buying [Korban Pesach] among matters that override Shabbos. This implies that it is forbidden for the sake of Chulin.
Magen Avraham (306:16): The Tur (CM 73) brings the Rosh, who wrote that if Reuven swore to pay on a certain day, and it fell on Shabbos, he gives a security on Shabbos worth the full debt to fulfill his oath. Shavah Kesef (something worth money) is like money. It is Cheftzei Shamayim (Hash-m's desire) that he fulfill his oath. The Beis Yosef said that perhaps the Rosh means that he fulfilled his oath only if the security was appraised and given [to be payment] for the appraised value. Therefore, the Rosh needed to permit due to Cheftzei Shamayim. If the security were not given for payment, a Mishnah explicitly permits giving a security. I disagree. The Rosh wrote afterwards 'if he swore to give money, and not a security...' This implies that before, he discusses giving for a security. He needed to say that it is Cheftzei Shamayim, for we do not pay debts on Shabbos. One may not even give a security, unless it is needed for Shabbos (Sa'if 6, 307:11).
Kaf ha'Chayim (306:60): See also Teshuvas ha'Rashba (741). The Radvaz says that according to the opinion that one must pay on Shabbos, they should strive to permit the vow or get the lender to agree to extend the loan, or say 'it is as if I was paid.' If they cannot, and the lender is not satisfied with a security, they put the money in the lender's Reshus. They may not do an Isur Torah, e.g. go through Reshus ha'Rabim. If possible, they should do so through a Nochri, or get the lender to accept a security with appraisal.