Do you use the same account on your device? Please note that the App Store does not support family sharing for in-app purchases or subscriptions, you need to use the same account. See more here: https://support.apple.com/en-us/HT203046
Please make sure that you are connected to the App Store and have internet access.
Do you use parental control on your device? Sometimes, this error can happen when it is switched on.
If nothing helps, we recommend to try deleting the app, restarting the device, and reinstalling the app from the store. Then, using Restore button should help.
Unfortunately, once or twice we've seen that it simply did not work on customer's home wi-fi, but it worked without any problems on a different wi-fi network.