The short answer
Implement purchases as a flow with a server in the middle: fetch products from the store, start the purchase, validate the resulting transaction on your server, grant the item, then tell the store the transaction is complete. Handle interrupted, pending and refunded purchases, offer restore for permanent items, and test with the stores' sandbox tools. Skipping server validation is the most expensive shortcut in mobile games.
Product types
Type Examples Behaviour
Consumable Coins, gems, lives, boosters Bought repeatedly, used up
Non-consumable Remove ads, unlock a character, premium upgrade Bought once, owned permanently, must be restorable
Auto-renewing subscription VIP membership, monthly pass Renews until cancelled, has states such as grace period
Non-renewing or prepaid Season pass for a fixed period Expires, does not renew automatically
Apple and Google use slightly different names, but the categories match.…