Want a simpler approach?
The RevenueCat SDK Handbook covers the same topics — with less code and a managed backend.
A complete guide to implementing in-app purchases and subscriptions on Android from scratch.
The big picture: key actors, core vocabulary, product types, and the three pillars of Google Play Billing.
Developer account, Play Console, service account keys, Pub/Sub for RTDNs — everything before a single line of code.
Consumable and non-consumable products: querying, purchasing, server verification, and the acknowledge-or-consume decision.
The Subscription → Base Plan → Offer hierarchy. Free trials, intro pricing, prepaid plans, and installment subscriptions.
BillingClient setup, connection lifecycle, product queries, and the four builder methods you must call correctly.
End-to-end from launchBillingFlow() to acknowledgement: payment dialog, callbacks, pending purchases, and multi-quantity.
Six replacement modes, proration math, linkedPurchaseToken chains, and choosing the right mode for each scenario.
Every BillingResponseCode explained. Simple retry, exponential backoff, and the complete error decision tree.
The 7-step server verification flow: receive token, call the API, check signatures, grant entitlements, acknowledge.
Cloud Pub/Sub setup, all 16+ notification types, idempotent handlers, and the "always call the API" rule.
Seven states (ACTIVE through PENDING), every transition, which states grant access, and queryPurchasesAsync() behavior.
Two-stage recovery: grace period with access retained, then account hold with access revoked. Configuration and code.
Cancellation ≠ immediate revocation. Pause mechanics, restore vs. resubscribe, deferral API, and winback strategies.
Opt-in increases, opt-out decreases, legacy price cohorts, migration API, and regional pricing considerations.
Server-side verification, purchase token obfuscation, Voided Purchases API, and ProGuard/R8 configuration.
License testers, Play Billing Lab, accelerated renewals, 11 test scenarios, and the response code simulator.
Batch APIs for subscriptions, base plans, offers, and one-time products. Quota tiers, reconciliation, and automation.
Every RTDN type, payload structure, and required server action on a single reference page.
All BillingResponseCode values, sub response codes, retry strategies, and the error handling decision tree.
Every endpoint for purchases, subscriptions, catalog management, and voided purchases with key response fields.
Breaking changes, new APIs, deprecations, and a step-by-step migration checklist from PBL 7 to PBL 8.
The complete state machine as a pull-out reference: all states, transitions, access rules, and token lifecycle.
A side-by-side look at what the SDK handles and what stays your responsibility.
Full SDK reference, platform guides, and integration walkthroughs for every feature.
Insights on subscription app growth, pricing strategies, and retention from industry experts.
Open-source Jetpack Compose paywall example with production-ready code.