If the lender issues an interest-free loan but stipulates that there will be a one-time late fee if the loan is not satisfied by a certain date, one would not be subject to the classical Biblical ribbis prohibition. There is however a rabbinical prohibition. Such an arrangement would be classified as haaromas ribbis (a ribbis trick) since it can be used as a loophole allowing one to circumvent the prohibition.
However, since this is only a rabbinical prohibition, it is subject to certain leniencies. For example, it is permitted to charge a late fee if the obligation was not initiated as a loan but rather as payment for service or a sale. This being the case, a vendor who offers goods or services on credit may require a late fee if the debt is not satisfied on time.
One who usually would not go out of his way to greet his friend, to attend his simchah, or to buy him an aliyah, may not do so if that individual has lent him money. There is a question among the poskim if he may casually thank his friend for this loan. However, thanking him effusively or buying him a gift to show appreciation for the loan must be avoided.
This halachah applies only during the loan period and at the time of repayment. After the loan has been repaid, there is no prohibition of ribbis devarim. There is a debate among the poskim as to how soon after the payment one may thank the lender.
A story is told of a student (Selected Writings p. 287) who borrowed money from Rav Yerucham Levovitz z”l, the renowned Mirrer mashgiach. The student began thanking him for the loan however Rav Yerucham interrupted and explained the concept of ribbis devarim.
A year later, the student returned to Rav Yerucham to borrow some more money. Remembering what had happened the year before, the student took the money and left without saying a word. Rav Yerucham called him back and admonished him for not having proper hakaras hatov The student protested that he was not allowed to say “thank you” for the loan, as Rav Yerucham himself had previously explained.
Rav Yerucham responded that although the borrower is prohibited from actually saying “thank you” because of hilchos ribbis, he must still have the appropriate hakaras hatov toward the lender. He may not express it by giving the lender a monetary or even a verbal present, but must feel gratitude for the loan. Rav Yerucham sensed that the student lacked the appropriate feelings.
This story illustrates the hashkafa of ribbis devarim. Although a loan is clearly a favor for the borrower, and he indeed must be grateful for the loan, the Torah prohibits the lender from being compensated by the borrower. However, although the borrower is prevented from demonstrating his hakaras hatov, he must still be appreciative.
In a similar vein, a gadol was once asked whether lending money with the intention to generate friendship is considered ribbis. He replied that hilchos ribbis encourages us to help each other with free loans. It teaches us how to act towards a fellow Jew. Creating and strengthening friendships by offering free loans is the purpose of hilchos ribbis, and certainly not a violation of its laws.
Ribbis devarim applies to other scenarios as well. A borrower may not greet the lender if he would not have done so before the loan (If the lender greets the borrower first, the borrower may return the greeting).