Hi @Jeet Patel - A simple option to get this info using the restapi - https://<Your JIRA URL>/rest/plugins/applications/1.0/installed/jira-software/license . This will return a JSON output, which can be parsed to get "expiryDateString".
The method getLicenseDetails(String licenseString, I18nHelper i18nHelper) may work - JAVA API
Kindly refer the link below for JAVA API related methods
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events