A method for obtaining a salt with a general formula: RxNI, wherein: RxN is an organic cation (RxN+), R represents substituents (R-) independently selected from a group consisting of organic substituents: R1-, R2-, R3- and
hydrogen (H-), x is a number of the substituents R- directly linked with the
nitrogen (N) atom in the organic cation RxN+, wherein x is 3 or 4, I is an
iodide anion (I-). The method comprises: preparing a reaction mixture comprising the steps of: synthesizing
hydrogen iodide (HI) in situ by mixing molecular
iodine (l2) with
formic acid (COOH) in a
molar ratio of molecular
iodine (l2) :
formic acid (COOH) of no less than 1.01:1, in a
solvent medium, introducing into the
solvent medium a compound being a donor of organic cation RxN+ in an amount providing the
molar ratio of the donor of organic cation RxN+ : molecular
iodine (l2) of no less than 1.01:1, and maintaining the reaction mixture at a temperature of not less than 20 DEG C for the time necessary to obtain the
reaction product being the salt with the general formula RxNI. The obtained product is a substrate for synthesis of perovskites.