Thin-film photovoltaic devices based on chalcopyrite Cu(In,Ga)Se2 (CIGS) absorber layers show excellent light-to-power conversion efficiencies exceeding 20%. This high performance level requires a small amount of alkaline metals incorporated into the CIGS layer, naturally provided by soda lime glass substrates used for processing of champion devices. The use of flexible substrates requires distinct incorporation of the alkaline metals, and so far mainly Na was believed to be the most favourable element, whereas other alkaline metals have resulted in significantly inferior device performance. Here we present a new sequential post-deposition treatment of the CIGS layer with sodium and potassium fluoride that enables fabrication of flexible photovoltaic devices with a remarkable conversion efficiency due to modified interface properties and mitigation of optical losses in the CdS buffer layer. The described treatment leads to a significant depletion of Cu and Ga concentrations in the CIGS near-surface region and enables a significant thickness reduction of the CdS buffer layer without the commonly observed losses in photovoltaic parameters. Ion exchange processes, well known in other research areas, are proposed as underlying mechanisms responsible for the changes in chemical composition of the deposited CIGS layer and interface properties of the heterojunction.