Gregory XII -- Last Pope to Resign
(1327-1417) was elected pope; calling himself Gregory XII, he had a .... a corrupt cardinal named Baldassare Cossa was chosen as his successor to the Pisa papacy.
The Medici had supported Cossa in his campaign to become cardinal and pope. Once in office, John XXIII made the Medici Bank the bank of the papacy