A version of this post first appeared on The Kansas City Star website.

Some things in life are widely acknowledged bad ideas, like giving your spouse a vacuum cleaner on Valentine’s Day or selling an old car to a friend. Lending money to a family member falls into this category, too: The potential for lingering bad feelings is so high that many people never do it. But in the right situation an intra-family loan can serve as a viable alternative to traditional savings and lending vehicles. A well-structured loan can even result in a win-win for the lender and the borrower.

Let’s say you are retired and living off a fixed income. You have $100,000 in bank deposits yielding .10 percent, and you’d like more yield on your money. Your son just graduated from college with $25,000 of school loan debt charging an average interest rate of 6 percent. Your son would like to reduce the interest charges on the school loans.

Or, say your daughter needs $10,000 to buy a used car. Although she qualifies for a car loan, the lender charges her an above-average rate because of her lack of credit history. You know she’s creditworthy, and you want to help lower her costs.

In each of these cases, an intra-family loan can be used to meet the objectives. Here are some tips to increase the chances of a positive outcome:

Put it in writing – Lending money is a business transaction, which should be founded on a creditor-debtor relationship. Execute a written contract or promissory note that outlines the terms of the loan, including the interest rate, monthly payment, schedule of payments, and what happens in case of prepayment or default. Turning an intra-family loan into a formal business transaction protects your entire family and covers the contingencies. Suppose you lend $25,000 to your son, but you die before he repays the loan. Your daughter may be unhappy if that $25,000 is not deducted from your son’s share of your estate.

Charge an IRS-approved interest rate – Although you can set your own interest rate, you should charge an interest rate that at least equals the IRS-approved applicable federal rate (AFR) – currently about 1 percent to 3.5 percent depending on the term of the loan. Under complicated IRS rules, some of the interest on below-market-rate loans will be treated as income to you and as a gift to the borrower.

Secure the loan – This means the lender gets to take something if the borrower fails to pay as agreed. The collateral should be specified in the contract and is usually something tied to the loan. For example, if the loan is for a car purchase, the lender may take possession of the car and sell it to get their money back. Secured loans reduce risk for the lender and give the borrower an incentive to pay.

Create a solid paper trail – Once the loan is made, maintain records of all payments and any demands for repayments if the borrower falls behind. The lender should also record any interest received as income on their tax return. This information is important should you later need to write off an intra-family loan as bad debt. An informal and undocumented bad debt will be considered a gift by the IRS.

Above all else, don’t compromise a healthy family relationship by the lender-borrower relationship. If there is any chance that the relationship could be irreparably damaged, then you should use traditional lending methods, like a bank loan.

A CFP® professional can help you decide if it makes sense to lend money within the family, and how to protect your relationships if you decide to go ahead.