How do in-app purchases work?
There are two kinds of in-app purchases &mdash; managed, and unmanaged.  The former have more direct involvement from Google and are transferrable between installs.

Managed purchases are generally for things like premium/pro versions and subscriptions, whereas the latter are for one-off purchases.  Unmanaged ones might cover extra donations or things like virtual currency.

So as long as the developer has implemented the right kind of purchase, you should be fine.  If not, and the transfer doesn't work, I would expect that an appeal to Google would result in a prompt refund.

See http://www.androidauthority.com/android-inapp-purchases-need-know-92432/