SharePoint 2016 app error

SharePoint 2016 app error Everything is fine but we had a small problem getting your licese. Please go back to the SharePoint store to get this app again and you wont be charged for it

In this post we will discuss how we can resolve an issue which comes while adding an app from SharePoint app store to your SharePoint 2013 on premise environment. The error comes as: Everything is fine, but we had a small problem getting your licese. Please go back to the SharePoint store to get this app again and you won’t be charged for it. If you have not yet started with SharePoint 2016, you can go through the Step by Step installation of SharePoint 2016 as well as you can check new list view auto indexing features of SharePoint 2016,
Recently while adding an app from SharePoint app store to my SharePoint 2016 on premise site I faced this error which looks like below:
Analysis and Solution:
I was trying to add the app from app store to my SharePoint 2016 on premise site and I was using System Account. The system account is the problem. SharePoint does not allow system account or farm account to add apps from SharePoint App Store.
Then I added another account and gave full permission to it like below:
Then I try adding the app using the other account like below:
This time it added successfully. Hope this will be helpful.

Reposted from: http://www.enjoysharepoint.com/Articles/Details/sharepoint-2016-app-error-everything-is-fine-but-we-had-21609.aspx