Google Play Billing is a service provided by Google Play that lets you sell digital content from inside an Android app or “in-app.” This document describes the fundamental building blocks of a Google Play Billing solution. Knowledge of these building blocks is necessary to decide how to implement your specific Google Play Billing solution.
If you want to sell physical goods on Android, refer to Google Pay.
Note: Ensure that you comply with applicable laws in the countries where you distribute apps.
Following is a list of high-level building blocks of a Google Play Billing soution:
- Google Play - An online store where users can download digital products.
- Google Play Console - The interface used by app developers to publish an app on Google Play. App developers use the Google Play Console to identify details about their app, including any in-app products. For more information, refer to The Google Play Console.
- Google API Console - The console used to manage backend APIs, such as the Google Play Developer API. You can create service accounts here in order to verify purchases and subscriptions from your secure backend server.
- Android device - Any device used to run Android apps, such as a tablet or mobile phone.
- Android app - An application intended to run on an Android device.
- Secure backend server - A developer-provided server used to implement purchase verification or subscription features, such as real-time developer notifications.
- The Play Store app - The app responsible for managing all operations related to the Google Play Billing. All requests made by your app will be handled by the Play Store app.
- Google Play Billing Library - An API that developers use to implement Google Play Billing within an app.
- Google Play Developer API - A REST API used to programmatically perform a number of publishing and app-management tasks. It includes two components, the Subscriptions and In-App Purchases API used to manage in-app purchases and subscriptions, and the Publishing API to upload and publish apps, and other publishing-related tasks.
- Real-time developer notifications - Server push notifications that give developers
the capability to monitor state changes, such as
SUBSCRIPTION_RECOVERED, for Play-managed subscriptions.
In-app product types
Google Play Billing can be used to sell two types of in-app products:
- One-time products: an in-app product requiring a single, non-recurring charge to the user's form of payment. Additional game levels, premium loot boxes, or media files, are examples of one-time products. The Google Play Console refers to one-time products as "managed products", and the Google Play Billing library specifies one-time products as "INAPP".
- Subscriptions: An in-app product requiring a recurring charge to the user's form of payment. Online magazines or music streaming services are examples of subscriptions.
In-app product configuration options
One-time products and subscriptions have several common configurable options within the Google Play Console. Following are the most important common configurable options:
- Title - A short description of the in-app product, such as “loot box.”
- Description - A longer description of the in-app product, such as “A special in-game treasure chest containing useful stuff for your character.” This field may be used in your app's store listings page to describe your in-app product.
- Product ID - A unique, human readable ID for your product. Product IDs are also called SKUs in the Google Play Billing Library.
- Price / Default Price - The amount the user will pay for the in-app product. Default price has a slightly different meaning for one-time products than for subscriptions:
- The default price for a one-time product reflects the amount (in that user’s preferred currency) the user will be charged for the product. The default price is charged to the customer once for each one-time product purchase.
- The default price for a subscription is the price the user will be charged in that user’s preferred currency after they enter a regular billing cycle (subscriptions can have free trial and introductory pricing too). The default price is charged to the customer on a recurring basis for each subscription that a user has purchased.
Warning: You cannot change the price of an in-app product after you make it available for purchase.
A single app can have multiple in-app products available for purchase, each with different Product ID and price. The Google Play Console provides pricing templates which are used to easily configure several in-app products that share the same price.
Unique one-time product configuration options
Promo codes are codes that a user uses to get a one-time product free of charge. The user enters the promo code in your app or in the Google Play Store app to receive the one-time product at no cost. Use promo codes to build a base of users for your one-time products.
Unique subscription product configuration optionsThe Google Play Console offers a lot of flexibility when creating subscription products. Following is a list of the options available for your subscription products:
- Billing period - The frequency at which a user is charged while their subscription is
active. You can choose between weekly, 1 month, 3 months, 6 months, and annual billing
periods in the Google Play Console.
Billing continues indefinitely at the interval and price specified for the subscription. At each subscription renewal, Google Play charges the user account automatically, then notifies the user of the charges afterward by email.
- Free trial period - The frequency at which a user can access a subscription without
being billed. A free trial period is a way to entice users to try your subscription before
committing to purchase it.
You can set a free trial period of 3 or more days.
- Introductory price - The price of the subscription over a certain number of initial, “introductory” billing periods. Introductory price is a way to entice users to try your subscription while simultaneously gaining some revenue. The Introductory price must be less than the subscription's normal price.
- Grace period - The amount of time a user’s subscription will remain active, giving the user additiona time to fix their payment issue. A grace period starts when a user's form of payment, such as a credit card, is declined.
- Account hold - The state a subscription can enter when a user does not update their form of payment during the grace period. Account hold lasts 30 days during which time the subscription content is not available to the user.
For more details about each of these options, refer to Add subscriptions and recurring charges in the Google Play Console help center.