As specific inhibitors of the gastric proton pump, responsible for gastric acidification, K+-competitive acid blockers (P-CABs) have recently been utilized in the clinical treatment of gastric acid-related diseases in Asia. However, as these compounds have been developed based on phenotypic screening, their detailed binding poses are unknown. We show crystal and cryo-EM structures of the gastric proton pump in complex with four different P-CABs, tegoprazan, soraprazan, PF-03716556 and revaprazan, at resolutions reaching 2.8 Å. The structures describe molecular details of their interactions and are supported by functional analyses of mutations and molecular dynamics simulations. We reveal that revaprazan has a novel binding mode in which its tetrahydroisoquinoline moiety binds deep in the cation transport conduit. The mechanism of action of these P-CABs can now be evaluated at the molecular level, which will facilitate the rational development and improvement of currently available P-CABs to provide better treatment of acid-related gastrointestinal diseases.