You could have an ulcer. Stomach ulcer may give pain shortly after eating. Duodenal ulcer could be hours after you eat. If the pain is just above the stomach, that would be gastro-esophageal reflux disease (GERD) also known as heartburn. Onions, garlic, and carbonated beverages may cause GERD ...