Selling a debt to another:
It is permitted for one to sell a debt that he is owed, to another person, thus giving him the rights to collect the debt when the time arrives. One may sell him the debt for even a lower price than the original amount that is owed. Nevertheless, when selling the debt for a lower price one must abide by the following regulations regarding liability:
A. Lender selling:
Lender selling for lower price without liability: It is permitted for one to sell a debt contract to another person for a lower price than the amount owed, so long as the seller does not carry liability of payment for the debt. Thus, if Reuvein lent Shimon $1000 and the money is due in six months and Reuvein is currently in need of the cash, it is permitted for him to sell the debt contract to Levi for $700, and Levi will collect the $1000 in six months from Shimon, so long as Reuvein is removed from all liability of payment. Hence, if at the conclusion of the six months Shimon has still not paid back the loan to Levi, Reuvein has no accountability towards providing Levi with his money. If however Reuvein retains liability for the payment of the debt, such as that in the event that Levi became poor and cannot pay the loan after six months then Reuvein will give Levi the money he is owed, then it is forbidden to sell it for a lesser price than the amount of the loan. Furthermore, it is forbidden to do so even if he will not have to give Levi the money that he is owed on the contract, but will simply have to return to Levi the money which he received from him when he purchased the contract.
Lender selling for lower price with liability for the authenticity of the contract: It is permitted for the seller of the contract to retain liability on the authenticity of the loan which he is selling, such as in the event that it is discovered that the borrower already paid back the loan to Reuivein, and any case of the like, then Reuvein will reimburse the buyer of the contract with the amount of money that he received from him, or even with the entire amount written on the loan. 
Lender selling an oral debt [no contract] for lower price: Upon selling an oral debt to another for less than the amount of the debt, the buyer must acquire the debt in the presence of all three people [i.e. Mamad Shloshtan; the seller/Malveh, the buyer and the borrower/Loveh] as otherwise he does not acquire the loan. In the event that the transaction was not done Bemamad Shloashtan, then since the money given to the seller does not acquire the loan to the buyer, the money is therefore considered a loan and it is forbidden for the buyer to profit from this loan more money than he gave.
Lender selling the debt for lower price to the borrower: Just as it is permitted to sell the debt to another person, so too it is permitted to sell it to the borrower himself. This means that one offers the borrower to pay less than the amount of the loan prior to its due date arriving. [For example, in the above case of Reuvein and Shimon, if the $1000 debt is due in two months and Reuvein is currently in need of the cash, he may offer Shimon to give him $800 now, prior to the date of payment for the loan, and consider the loan to have been paid. In essence, Reuvein has sold the debt of $1000 to Shimon for $800.]
Lender selling the debt of a gentile: The above allowance for a lender to sell a debt only applies when the debt is owed by a Jew. If however the debt is owned by a gentile then it is not possible to sell the debt at all with any form of Kinyan, even if the debt is documented, [and hence if the buyer collects the debt from the gentile for a greater amount, it is considered that he is taking the money directly from the lender, including the interest]. The only option in such a case is for the lender to forgive the loan to the gentile. This means that the buyer conditions with the lender who is selling the debt that in exchange for receiving the money from the buyer, the lender forgives the gentile completely of his debt, and with this money the buyer acquires from the lender any money that he is able to get out of the gentile borrower.
B. Borrower selling:
Borrower transferring the debt to a third party in exchange lower amount of immediate payment: It is only permitted for the borrower to purchase his debt from the lender for a lesser price if he does so directly, through paying him directly. It is however completely forbidden due to Ribis for the borrower to pay a third party less than the amount of the loan that he is obligated to repay the lender, and in exchange have the third party exempt him from his debt with the lender through paying the lender his debt upon the arrival of the due date of payment. This prohibition applies even if the third party is able to appease the original lender and convince him to accept the exact amount that the borrower gave him. [For example: If Reuvein lent Shimon $1000 and the money is due in six months and Levi is currently in need of the cash, it is forbidden for Shimon to sell the debt contract to Levi for $700, and have Levi pay the $1000 debt to Reuvein when the due date arrives in six months. Now, even if Levi is able to convince Reuvein to accept only $700 for the loan, and consider the loan nullified, it is still forbidden to make the above agreement, as in the end of the day Shimon benefits from Levi the saving of $300 due to the $700 loan he gave Levi.]
It is forbidden for a lender to sell a loan to a third party for a lesser amount unless the seller relinquishes liability on the payment of the loan. He may however retain liability of the authenticity of the loan and its current unpaid status. By an oral loan, the transference of the debt is only legalized if it took place with Mamad Shlashton. A loan given to a gentile may not be sold and the only option is to forgive the loan and have the buyer acquire his rights. A borrower may not sell his debt to a third part for a lesser price than that which is owed.
May the lender sell his debt for a lesser amount and retain liability if the lesser amount is in exchange for the expenses the buyer will entail in collecting the debt [i.e. Sechar Tircha]?
Shiur of Sechar Tircha: The amount of money that the buyer may diminish from his payment in exchange for the loan must be a set fee irrelevant of when the loan is due. Thus, the buyer may decide to charge the seller 5% for his Sechar Tircha. This charge however must be the same whether the loan is due to be paid immediately, or only in a number of months. If he charges more money for a loan that is not yet due, then it reveals he is not charging Sechar Tircha but rather Ribis for the delay of payment.
 Admur Ribis 57; See Bris Pinchas 17/9-11
 Admur ibid; Michaber 173/4; Yerushalmi 5/1
 Admur ibid; Michaber ibid; Sefer Haterumos 4/13 in name of Ramban; Rashba 3/261
 Admur ibid; Shacha 173/9; Darkei Moshe 173/5
The reason: As this is a case of “Karov Leschar and Rachok Lihefsed”, as the buyer of the contract will for sure gain the original investment back, either from Reuvein or Shimon, and also stands a chance to make more money through having the full amount paid by Shimon. Thus, according to Halacha this is not considered a sale at all but rather a loan, and consequently when the buyer collects the owed funds from Shimon, which is more than the amount which he gave Reuvein the seller, this is considered a profit on his loan [and is complete interest]. [Admur ibid; Taz 176/3; Rashba ibid]
 Admur ibid; Michaber ibid
 Admur ibid; Rashba ibid
 Admur ibid; Shach 173/8; Or Zarua Baba Metzia 180; Hagahos Ashri 21
 Smeh Choshen Mishpat 66/49
 Admur ibid; Michaber C.M. 66/19
 Admur Ribis 58; Michaber 173/4; Darkei Moshe 173/3; Mordechai 317; See Maharam Shick 161
 The novelty in this ruling is that we do not consider the $800 given from Shimon to Reuvein as a loan, which would cause that when Shimon then keeps the $1000 upon arrival of the due date, that he has profited $200 in interest. Rather we view the matter as a sale.
 Admur ibid and 69; Or Zarua Baba Metzia 180
 Admur 69; Shach 169/61; Perisha 169/41; Michaber 169/18; Semak 260
Other opinions: Some Poskim rule that if the debt is documented then it may be sold to another even if the debt is owed by a gentile. [Rama C.M. 66/32]
 Admur ibid and 69
 Admur 69; Michaber 169/18; Regarding why the debt is still valid if the Jew forgave the debt, see Rama Choshen Mishpat 66/32 that one may collect a debt from a gentile even after it is paid and certainly after it is forgiven.
 Admur ibid; Rama 173/4; Darkei Moshe 173/6; Rashba 1/686
 The reason: As since the borrower does not acquire the debt from the lender through paying the third party, [as the lender never received any money, and never agreed to transfer the loan, therefore the debt is never legally transferred to the hands of the third party]. This causes that the money given to third party by the borrower is a debt upon him until he pays the lender on behalf of the borrower. This is exactly similar to the borrower lending money to a third party on condition that the third party pays a debt of the lender upon the due date arriving, which is a greater amount than the amount he borrowed. This is complete Ribis. [Admur ibid; Shach 173/11; Taz 173/7]
 Admur Ribis 58; Rama ibid
The reason: As since the borrower is in truth obligated to pay the lender a greater sum, and the third party exempts the borrower from this sum in exchange for the loan that he received from the borrower for a lesser amount then the debt, it therefore ends up as Ribis. [Admur ibid; Taz ibid] In other words the debt is considered acquired by the third party at the time of the loan of a lesser amount, and hence irrelevant of what happens in the future, and if the lender accepts less money, at the time of the transaction with the third party Ribis had taken place. [Implication of Taz ibid, Vetzrauch Iyun if this is the intent of Admur] Now, although in this case the Ribis does not reach hands of the borrower but rather the hands of the lender, nevertheless, since the borrower benefits from this transaction in now being exempt from his debt, therefore it is considered as if the money has reached his hands. [Admur ibid]
 Bris Pinchas p. 219-221; So rules regarding charging a consumer more money for a later payment that involves Tircha: Beis Efraim Y.D. 41; Mayim Rabim 38; Mishpat Ribis 20/8; Bris Yehuda 22 footnote 6
 One may diminish money from the loan contract in order compensate for the work and fees that the buyer of the loan must go through in order to receive the payment.
 Bris Pinchas 17/14; Bris Yehuda 9/9; Toras Ribis 19/22 footnote 44; Mishpitei Ribis p. 3423 in name of Rav SZ”A