In 1415, Cosimo allegedly accompanied the Antipope John XXIII at the Council of Constance. In 1410, Giovanni lent John XXIII, then simply known as Baldassare Cossa, the money to buy himself the office of cardinal, which he repaid by making the Medici Bank head of all papal finances once he claimed the papacy. This gave the Medici family tremendous power, allowing them to threaten defaulting debtors with excommunication, for instance. But misfortune hit the Medici Bank in 1415, when the Council of Constance unseated John XXIII, thus taking away the near monopoly they had held on the finances of the Roman Curia; thereafter, the Medici Bank had to compete with other banks. However, after the Spini Bank of Florence went insolvent in 1420, they again secured priority. John XXIII, facing the enmity of a church council at which he was accused of a large variety of offenses against the Church, was confined by Sigismund, Holy Roman Emperor to Heidelberg Castle until the Medici paid his ransom and granted him asylum.