The fact that a persistent product was purchased is stored in the local persistent storage, so you can use the Purchased property of the item, which immediately returns, whether the item is purchased (you don’t need to manage this yourself).
This persistent storage is based on the Identifier of the item, which should not be changed in the lifetime of the application for this feature to work correctly.
Notice, this persistent storage is by no means cryptographically strong. It is generally strong enough against an advanced user (i.e. copying registry from one machine to another, for example, will not help), but it does not attempt to be strong enough to withstand a hacker attack (code disassembly and/or debug will reveal a way for the particular app to be broken).
If you need higher level of protection or if you need further validations against the payment servers, you might need to use custom cryptographic libraries or other tools.
Once the app is uninstalled and reinstalled, the persistent storage will no longer contain the fact that the purchase was made. Generally speaking, another purchase attempt (if the item is defined as Persistent) will not result in an additional charge, instead the item will be reported as bought, without any further debit.
You can (and probably should) provide the user with an option to automatically restore any previous purchases (using the RestorePurchases method). This method queries the server for the items, which were already purchased.
For Apple In-App Purchases, non-consumable items are restored if Apple user already purchased the item; for PayPal, the items are restored, if they were already bought using this hardware (this feature uses all of the computer’s MAC Addresses to perform the best possible match, even if some of the hardware was changed).
It should be noted that PayPal does not generally provide this feature and PayPal’s other capabilities were used to provide it.