What causes stomach pains in top of stomach?

If you eat too much food or swallowing food not properly chewed. In other words indigestion.