Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
The evidence about the permissibility of the first case is the Saying of Allah: {O you who believe! When you contract a debt for a fixed period, write it down. ….}[2:282].
Another evidence is the story of Barirah a slave-girl who bought her freedom from her masters with 9 Awqiyah ( about 119 gram of silver) giving one Awqiya each year. This is selling by installments which the Prophet (Sallallahu Alaihi wa Sallam) did not forbid.