Pay it forward is an expression for describing the beneficiary of a good deed repaying the kindness to others instead of to the original benefactor.
The concept is old, but the particular phrase may have been coined by Lily Hardy Hammond in her 1916 book In the Garden of Delight. Robert Heinlein’s 1951 novel Between Planets helped popularize the phrase.
“Pay it forward” is implemented in contract law of loans in the concept of third party beneficiaries. Specifically, the creditor offers the debtor the option of paying the debt forward by lending it to a third person instead of paying it back to the original creditor. This contract may include the provision that the debtor may repay the debt in kind, lending the same amount to a similarly disadvantaged party once they have the means, and under the same conditions. Debt and payments can be monetary or by good deeds. A related type of transaction, which starts with a gift instead of a loan, is alternative giving.