Pepcid IV works by blocking histamine receptors in the stomach, which reduces acid production and helps prevent acid from backing up into the esophagus. This medication can effectively diagnose GERD by relieving associated symptoms. Rare side effects may include headache, nausea, or diarrhea.