I had stomach pain on and off for 5 months. More a dull ache that seemed to move about my stomach. I also had lower back pain, but like you I put off going to the doctor. Finally I went and had the endoscopy. It revealed quite a large ulcer.
I had been taking naproxen, just one tablet 2 or 3 times a week during this time for my back. The doctor put me on a load of meds and asked if I had been taking any tablets for pain. I told the truth and he believes this to be the cause of the ulcer. So 7 weeks later I am just finishing the meds he gave me and feeling much better. Not 100 percent but over 90.
But I have no back pain at all now it was "referred" pain from the ulcer. Go back in 10 days and expect to get one more months worth of meds. Pretty sure there will not be another endoscopy as no mention was made of fasting before the next appointment.
Because I had to be admitted to be knocked out for the procedure my insurance covered about 90% of the bill. I will not put off seeing a doctor for so long again.