The H+, K+-ATPase (HKA) uses ATP to pump protons into the gastric lumen against a million-fold proton concentrationgradient while counter-transporting K+ from the lumen. The mechanism of release of a proton into a highly acidic stomach environmentand the subsequent binding of a K+ ion necessitates a network of protonable residues and dynamically changing protonation states in the cation binding pocket dominated by five acidic amino acid residues E343, E795, E820, D824, and D942. We perform molecular dynamics simulations of spontaneous K+ binding to all possible protonation combinations of the acidic amino acids and carry out free energy calculations to determine the optimal protonation state of the luminal-open E2P state of the pump which is ready to bind luminal K+. A dynamic pKa correlation analysis reveals the likelihood of proton transfer events within the cation binding pocket. In agreement with in-vitro measurements, we find that E795 is likely to be protonated, and that E820 is at the center of the proton transfer network in the luminal-open E2P state. The acidic residues D942 and D824 are likely to remain protonated, and the proton redistribution occurs predominantly amongst the glutamate residues exposed to the lumen. The analysis also shows that a lower number of K+ ions bind at lower pH, modeled by a higher number of protons in the cation binding pocket, in agreement with the `transport stoichiometry variation' hypothesis.