A method for obtaining a salt with a general formula: R x NI, wherein: - R x N is an organic cation (R x N +), - R represents substituents (R-) independently selected from a group consisting of organic substituents: R 1 -, R 2 -, R 3 - and hydrogen (H-), wherein the donor of organic cation R x N + contains as the organic substituents: R 1 -, R 2 - and optionally R 3 -moieties independently selected from the group consisting of: straight chain or branched chain alkyl substituents with the general formula C y H z containing 1 to 8 carbon atoms in the substituent molecule, optionally containing at least one heteroatom substituting the carbon atom or hydrogen atom in the substituent molecule, wherein the heteroatom is selected from the group consisting of: oxygen, nitrogen, sulphur, iodine, chlorine and bromine, - x is a number of the substituents R- directly linked with the nitrogen atom in the organic cation R x N +, wherein x is 3 or 4, - I is an iodide anion (I -), characterised in that the method comprises: - preparing a reaction mixture comprising the steps of: - synthesizing hydrogen iodide in situ by mixing molecular iodine (I 2) with formic acid (COOH) in a molar ratio of molecular iodine (I 2): 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 R x N + in an amount providing the molar ratio of the donor of organic cation R x N +: molecular iodine (I 2) of no less than 1.01:1, and - maintaining the reaction mixture at a temperature of not less than 20 °C for the time necessary to obtain the reaction product being the salt with the general formula R x NI, wherein amine is used as the donor of organic cation R x N +, and the obtained salt (R x NI) contains the organic cation (R x N +) selected from the group consisting of: alkylammonium cations (R(H 3)N +), dialkylammonium cations R 2 (H 2)N +, trialkylammonium cations (R 3 N +), or wherein formamidine acetate is used as the donor of organic cation R x N + for obtaining formamidinium iodide (H 2 N-C =N(H 2)I). - R x N is an organic cation (R x N +), - R represents substituents (R-) independently selected from a group consisting of organic substituents: R 1 -, R 2 -, R 3 - and hydrogen (H-), wherein the donor of organic cation R x N + contains as the organic substituents: R 1 -, R 2 - and optionally R 3 -moieties independently selected from the group consisting of: straight chain or branched chain alkyl substituents with the general formula C y H z containing 1 to 8 carbon atoms in the substituent molecule, optionally containing at least one heteroatom substituting the carbon atom or hydrogen atom in the substituent molecule, wherein the heteroatom is selected from the group consisting of: oxygen, nitrogen, sulphur, iodine, chlorine and bromine, - x is a number of the substituents R- directly linked with the nitrogen atom in the organic cation R x N +, wherein x is 3 or 4, - I is an iodide anion (I -), - preparing a reaction mixture comprising the steps of: - synthesizing hydrogen iodide in situ by mixing molecular iodine (I 2) with formic acid (COOH) in a molar ratio of molecular iodine (I 2): 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 R x N + in an amount providing the molar ratio of the donor of organic cation R x N +: molecular iodine (I 2) of no less than 1.01:1, and - synthesizing hydrogen iodide in situ by mixing molecular iodine (I 2) with formic acid (COOH) in a molar ratio of molecular iodine (I 2): 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 R x N + in an amount providing the molar ratio of the donor of organic cation R x N +: molecular iodine (I 2) of no less than 1.01:1, and - maintaining the reaction mixture at a temperature of not less than 20 °C for the time necessary to obtain the reaction product being the salt with the general formula R x NI, wherein amine is used as the donor of organic cation R x N +, and the obtained salt (R x NI) contains the organic cation (R x N +) selected from the group consisting of: alkylammonium cations (R(H 3)N +), dialkylammonium cations R 2 (H 2)N +, trialkylammonium cations (R 3 N +), or wherein formamidine acetate is used as the donor of organic cation R x N + for obtaining formamidinium iodide (H 2 N-C =N(H 2)I).