Guide

The complete guide to server-side purchase verification & entitlements

Chapters on the path from a purchase token to a feature flag your backend can trust. Examples cover Google Play, the deepest-coverage path, and Apple App Store, which is implemented with limitations — see the platform support matrix for per-feature status.

This is the long version. If you want the orientation in one sitting, read the short version — a single post covering why client-side checks are advisory, how each store's verification API works, and the pitfalls teams hit. The chapters below take one problem each and go all the way down: what the store actually gives you, what you may store and for how long, how entitlement state changes over a subscription's life, how to keep that state current without a nightly reconciliation job, and which store products grant which entitlement.

Read it end to end if you are building verification yourself, or jump to the chapter matching the decision in front of you. Every chapter is written to be useful whether you build it in-house or hand it to a managed layer.

In this guide

Chapter 1: Why client-side verification fails

Replay attacks, patched clients, and extracted API keys — why a store SDK response on the device is advisory, and what moving the trust boundary to your server actually buys you.

Chapter 2: Purchase tokens: hashing and encryption

A purchase token is a bearer credential. Hash it for deduplication and idempotency, encrypt only the copy you need for refresh, and keep the raw value out of logs and plain database columns.

Chapter 3: The entitlement state machine

Active, cancelled, expired, grace period, on hold — the states a subscription moves through, the transitions that trip teams up, and why a boolean "is premium" column is not enough.

Chapter 4: RTDN and App Store Server Notifications

How Google Play Real-time Developer Notifications and Apple's signed server notifications deliver lifecycle events, and how to process them safely: ordering, idempotency, and retries.

Chapter 5: Mapping store products to entitlements

Why a store product id and an entitlement id are different things, how several store products collapse into one entitlement, and how that mapping gets configured.

Related reading

Server-side purchase verification: the definitive guide

The short version — the whole subject in one post, if you would rather skim before committing to five chapters.

Server-side entitlements

What Tierux does with all of the above: verification, token handling, and normalized entitlement state behind one REST call.

Platform support matrix

Per-feature, per-platform status for Google Play and Apple App Store — the canonical reference for what ships today.

Build subscription billing, server-side

Free tier — unlimited apps, 1 paywall. No credit card, no revenue share.

Start free