Hello and hope you are doing well.
The most common cause for this type of pain which starts at the back just below the rib cage and radiates to the front and goes into the pelvis is 1. Renal colic. It occurs as episodes of pain recurring in nature. The pain is spasmodic in nature as the ureter is trying to push through the obstruction, which is usually a renal stone. The ureter is the tubular structure that connects the kidney to the bladder. So each time the urine tries to pass through the obstruction it causes severe pain. Small stones can pass through and may not be detected. It can be accompanied by nausea, vomiting, sweating and sometimes blood in the urine. The other causes for the pain are: 2. Pyelonephritis (infection of the kidneys) and Glomerulonephritis (inflammation of the kidneys), here you are likely to have fever, 3. Gastroenteritis, diverticulitis, bowel obstruction, polyps and Irritable bowel syndrome, here there should be accompanying bowel symptoms like diarrhea and vomiting. Discuss these options with your doctor. Besides, blood tests, urine analysis, an x ray and an ultra sonogram of the abdomen, sometimes an Intravenous pyelogram and a CT scan may be needed to diagnose. In the meantime take OTC Naproxen for pain relief and plenty of oral fluids.
Hope this helped and do keep us posted.