I was working in SharePoint, ad I kept getting the same error every time I tried to add an app on our on-premises SharePoint 2013. I thought it may have been something with our server, so I tried it on my SharePoint Online account too and got the same error:
Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won’t be charged for it.
After doing some research (there was not much on this error online), I found the issue. I was logging in as a Farm Administrator account and apparently you cannot add apps using a Farm Admin account – which seems strange that the error does not reflect that and the fact that I have permission to everything else.
I created a test non-admin account and gave the account full control to a test site, and it added the app just fine without any issues.
Let me know if this helps you!