From: Rabbi Moshe Sofer
To: Rabbi Moshe of Paksh
The Chasam Sofer rules that a Jew may serve as guarantor for another Jew's interest-bearing loan from a non-Jew when the interest has been capitalized into the principal from the outset, since the entire sum is then regarded as principal. He grounds this in R' Yochanan's principle that a written self-imposed obligation creates a genuine Torah-level debt, and cites the Mordechai's ruling and the Shiltei Giborim's testimony of widespread practice in support.
Source: Shu"t Chasam Sofer YD §136