The influence of n-octylammonium iodide (OAI, passive layer) on the types of phases formed in a (MACl)0.33FA0.99MA0.01Pb(I0.99Br0.01)3perovskite film was studied using X-ray diffraction. Using UV spectrophotometric techniques, it was determined how varied OAI additive layer ratios affected the linear and nonlinear optical characteristics of glass substrates/FTO/compact TiO2/mesoporous TiO2/(MACl)0.33FA0.99MA0.01Pb(I0.99Br0.01)3films. All films’ direct optical bandgap energies were determined to be 1.54 eV. The effects of OAI addition on the films’ photoluminescence intensity and emitted colors were also investigated. For the fabricated perovskite solar cells (PSCs) without an OAI passivation layer, the corresponding power conversion efficiency (PCE), open-circuit voltage (VOC), short-circuit current density (JSC), and fill factor (FF) values were 18.8%, 1.02 V, 24.6 mAcm−2, and 75%, respectively. When the concentration of OAI reached 2 mg, the maximum obtained values of PCE, VOC, JSC, and FF were 20.2%, 1.06 V, 24.2 mAcm−2, and 79%, respectively. The decreased trap density and increased recombination resistance were responsible for the improvement in solar cell performance.