The example below depicts the process by which HCl is secreted into the lumen on the stomach.
Carbon dioxide difuses into parietal cells of the stomach by the the process of simple diffusion.
The enzyme carbonic ahydrase combines carbon dioxide and water to yield carbonic acid which quickly dissociates into bicarbonate ion and hydrogen ion
The hydorgen ion is quickly transported into the lumen of the stomach by the ATP dependent proton pump. Thus the carbonic anhydrase reaction is driven in the direction of formation of biocarbonate ion.
the bicarbonate ion concentration in the cell becomes greater than the biocarbonate concentration in the interstitial spaces and a transmembrane concentration gradient is formed.
The bicarbonate ion is transported down its concentration gradient by the anion transport protein which is an antiport. In order for the bicarbonate ion to be transported down its concentration gradient Cl ion must be cotransported in the opposite direction.
This cotransport of Chloride ion and bicarbonate ion results in the concentration of Cl ion in the cell that is greated than in the lumen of the stomach.
The Cl ion then is transported down this transmembrane concentration gradient by the Cl ion permease by the process of facilitated diffusion.
Study the cartoon below