Menu

1 / 5

In-App Purchase Implementation Guide for Mobile Games

DEV Community: ios·A Plus Games Studio·1 day ago
#vSKMI23Y
#devtoios#devto#dev#purchase#server
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.