Capsaicin has no effect on heartburn, and some studies have shown it helps with it.
"In a double-blind study of people with dyspepsia (heartburn),
supplementation with 833 mg of cayenne powder in capsules, three times per day before meals, reduced heartburn symptoms by 48%, compared with a placebo. However, two of 15 individuals receiving cayenne discontinued it because of abdominal pain."
Bortolotti M, Coccia G, Grossi G. Red pepper and functional dyspepsia. N Engl J Med 2002;346:947-8 [letter].
Cayenne - [Alternative Medicine]