20 C.F.R. § 404.1088
(b) Other conditions. You must have been paid your full share of the partnership's capital before the close of the partnership's taxable year in which retirement payments are made. Also, no member of the partnership can have any financial obligations to you (in his or her capacity as a partner) except to make the retirement payments. Lastly, you cannot perform any services for the partnership in the partnership's taxable year which falls wholly or partially in your taxable year in which you receive the retirement payments.
Example:D, a partner in the DEF partnership, retired from the partnership as of December 31, 1976. The taxable year of both D and the partnership is the calendar year. During the partnership's taxable year ending December 31, 1977, D rendered no service to any trade or business carried on by the partnership. On or before December 31, 1977, all obligations (other than retirement payments under the plan) from the other partners to D were liquidated, and D's share of the capital of the partnership was paid to him. Retirement payments received by D under the partnership's plan in his taxable year ending December 31, 1977, are excluded in determining net earnings from self-employment (if any) for that taxable year.