Qitzur Shulchan Arukh – 65:7
If one lends his money to a free for some time, so that the other would reciprocate and lend him much more money for a similar time, or a similar amount of money for more time, this is complete [i.e. textbook, Torah prohibited] interest.
If he lends him on the condition that the other will [at some other time] a similar amount for a similar time, some say this is also prophibited, some say it’s allowed, and it’s appropriate to be stringent.
However, if they did not make such a condition, however he happened of his own will to lend him money at another time, even though he doesn’t usually do this just that this person once lent him money, for this one can be lenient.
This touches on a complex issue — tit-for-tat favors. If it is done intentionally as a stated condition, such behavior is problematic. And if the favor received in exchange is greater, then the entire prohibition against interest is defeated! But even if not, while exchanging favors is permissible, to do so is relying on a leniency. This is a suboptimal way of viewing doing for others and the concept of gratitude.