I would like to change my app from paid to free and check if a user has paid for the app before.
If the user has not paid I will show ads and if the user has paid for it earlier I will not show ads.
Is this information stored and available?
You check the value of the original_application_version in the receipt.
If that version indicates the app was paid, not free, then you credit the user as appropriate.
Thanks, a good lead to start studying this.