Google Play Billing

Let you sell the digital content from inside an Android app.

Building Blocks

  1. Google Play:
    • An online store where users can download digital products.
  2. Google Play Console
    • The interface app developers use to publish apps on Google Play.
  3. Google API Console
    • The console for managing backend APIs, such as Google Play Developer API.
  4. Android device
    • Any device used to run Android apps.
  5. Android app
    • An application intended to run on Android device.
  6. Secure backend server
    • A developer provided server used to implement purchase verification or subscription features.
  7. The Play Store app
    • The app responsible for managing all operations related to the Google Play Billing.
  8. Google Play Billing Library
    • An API that developers use to implement Google Play Billing within an app.
  9. Google Play Developer API
    • A REST API used to programmatically perform a number of publishing and app-management tasks.
      • Subscription and In-App purchase API.
      • Publishing API.
  10. Real-time developer notifications Server push notifications that let you monitor state changes.

In-app product types

  • One-time products
    • The Google Play Console calls them managed products.
    • The Google Play Billing library calls them INAPP.
  • Subscriptions

Purchase tokens and order IDs

Google Play billing tracks products and transactions using purchase tokens and order IDs. - A purchase token is a string that represents a buyer's entitlement to a product on Google Play. - An order ID is a string that represents a financial transactions on Google Play.

For one-time products, every purchase creates a new token and a new order ID.

For subscriptions, an initial purchase creates a purchase token and an order ID. For each continuous billing period, the purchase token stays the same and a new order ID is issued.

In-app product configuration options

configuration options:

  • Title - A short description of the in-app product, such as "loot box."
  • Description - A longer description of the in-app product.
  • Product ID - A unique, human readable ID for your product. also called SKUs (Stock keeping unit)
  • Price / Default Price - The amount user will pay for the app-product.
    • The default price for one=time products reflects the amount the user will be charged for the product.
    • The default price for subscription is the price will be charged after they enter a regular billing cycle.

A single app can have multiple in-app products available for purchase, each with different Product ID and price.

Unique one-time product configuration options.

Promo codes are codes that a user uses to get a one-time product free of charge.

Unique subscription product configuration options.

  1. Billing period: The frequency at which a user is charged while their subscription is active.
    • weekly, "1, 3, 6 months", annual
  2. Free trial period: An amount of time during which a user may access a subscription without being billed.
  3. Introductory price: The price of the subscription over a certain number of initial, "introductory" billing period.
  4. Grace period: The amount of time a user's subscription will remain active, giving the user additional time to fix their payment issue.
  5. Account hold: The state of a subscription can enter when a user does not update their form of payment during the grace period.