Stomach pains after taking pill💊

Crystal
My stomach was hurting about 2 weeks ago (sorry for posting this late) so much that I couldn't sleep right or get comfortable. A week after it went away a bit. And now I still kinda get the pain but it goes away. I've also had diarrhea since until yesterday. It started after taking the pill and I'm just wondering if that can be the cause or if I just had a stomach thing. Help?