I’m assuming Cloud?
Firstly make sure you have "enableLicensing": true
in the atlassian-connect.json
Then as far as I know there are two ways to check license status (which of course the docs don’t tell you).
Check for ?lic=active in the URL query
AP.context.getContext(response => console.log(response.license))
Neither of those will tell you the specific license type, only if it’s active or not.
Copying across the insights from this comment:
AP.context.getContext(context => {
if (context.license && context.license.active) {
// Active trial | Active subscription | Cancelled subscription
} else {
// Unlicensed | Inactive trial | Inactive subscription
}
});
Where he says “Cancelled subscription
remains active
license until the end of the billing period, at which point it reverts to Unlicensed
”
Hope that helps