Speak with your doctor. Pain is two symptoms from your problem possibly.
First is sounds that you have an acid issue where your acid is higher up than where it should be: your stomach where we have mucus to protect ourselves from the acid harming and hurting our internal stomach wall tissues.
If the acid goes above our stomachs where mucus isn't created, then we experience the acid basically burning or better said, agitating out tissue. How high up your acid goes is up to your system and how much acid is escaping and traveling north toward your esophagus.
So symptom one is acid higher where it's not supposed to be. Symptom 2 is the pain from the acid upsetting your unprotected tissue walls AKA Heartburn or GERD.
Treating or stopping the pain is a bad strategy, because just because you don't feel the heartburn, doesn't mean your tissue isn't being burned by your acid. Remember, we secrete this acid to breakdown and digest foods. When the acid is outside our stomach we are digesting ourselves to some extent.
So, in this case, pain is an alarm and actually your friend because it's telling you something needs to be fixed. So what you might consider is reducing the acid or it's flow out of your stomach, which in turn will reduce or stop the pain.
Said another way, focus on the acid, where it is going and if you are producing too much acid. Make sense?