Hello
Thanks for writing to us with your health concern.
Painful periods are termed as dysmenorrhoea.
This is generally classified as primary dysmenorrhoea or secondary dysmenorrhoea.
Primary dysmenorrhoea is when there is no identifiable cause or pathology for the pain.
it occurs due to oversecretion of nociceptive ( pain generating ) hormones and substances in certain individuals who are predisposed to that.
Secondary dysmenorrhoea is when a cause is identified, such as uterine fibroids, ovarian cysts, 
adenomyosis, a polyp in the uterus, pelvic congestion etc.
SO first, please undergo a pelvic 
ultrasound scan.
Next a thorough internal gynecological evaluation should be performed.
If it is normal, you are indeed having primary dysmenorrhoea.
It can be treated by hormonal treatment.
Cyclical 
oral contraceptive pills when taken will reduce the pain and discomfort by  regulating the pain causing substances.
Also, combination of 
mefenamic acid and 
tranexamic acid taken during cycles will alleviate the cramps to a great extent.
To be of utmost benefit, it is better to start the medication a day or two prior to the expected date of your period.
All the best
Take care.