Google Play's billing system overview

Stay organized with collections Save and categorize content based on your preferences.

Google Play's billing system is a service that enables you to sell digital products and content in your Android app.

Product types

You can use Google Play to sell the following types of products:

  • One-time products: A one-time product is a product that users can purchase with a single, non-recurring charge to the user's form of payment. Examples of one-time products include additional game levels, premium loot boxes, and media files. One-time products are either consumable or non-consumable:

    • Consumable product: A consumable product is one that a user consumes to receive in-game content. When a user consumes your product, you dispense the associated benefits or effects in a process known as provisioning. For example, a user might purchase an in-game currency product such as a stack of coins. When the user consumes the product, your app then dispenses a fixed number of coins to the user, and the purchased stack of coins product is no longer available. Consumable products can be purchased multiple times.
    • Non-consumable product: A non-consumable product is a product that is purchased once and provides a permanent benefit. Once purchased, these products are permanently associated with the user's Google account. Examples of non-consumable products include premium upgrades and level packs.

    The Google Play Console refers to one-time products as managed products, and the Google Play Billing Library refers to them as "INAPP" products.

  • Subscriptions: A subscription is a set of benefits that users can access during a stated time period. You can have multiple subscriptions within the same app, either to represent entirely different benefits (for example, a streaming video app could have separate “news” and “sports” subscriptions), or different tiers of a single set of benefits (for example, a cloud storage app could have 100 GB, 1 TB, and 10 TB subscriptions).

    Users gain access (or entitlement) to a subscription by purchasing a base plan or offer, either in your app or on Google Play.

    Subscriptions contain one or more base plans. A base plan specifies a unique set of attributes for a given billing period and renewal type. You can specify whether a base plan is auto-renewing or prepaid (non-renewing).

    Eligible users can purchase an offer to obtain access with a trial and/or introductory price. While any user can purchase a base plan, offers are available only to users who meet the eligibility criteria you define.

    The Google Play Billing Library refers to subscriptions as SUBS.

Purchase tokens and Order IDs

Google Play 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. It indicates that a Google user is entitled to a specific product that is represented by a purchase object. You can use the purchase token with the Google Play Developer API.
  • An Order ID is a string that represents a financial transaction on Google Play. This string is included in a receipt that is emailed to the buyer.

Order IDs are created every time a financial transaction occurs. Purchase tokens are generated only when a user completes a purchase flow.

  • For one-time products, every purchase creates a new purchase token. Most purchases also generate a new Order ID. The exception to this is when the user is not charged any money, as described in Promo codes.
  • For subscriptions, an initial purchase creates a purchase token and an Order ID. For each automatic renewal, the purchase token stays the same, and a new Order ID is issued. Upgrades, downgrades, replacements, and re-sign-ups all create new purchase tokens and Order IDs.

For subscriptions, note the following:

  • Subscription upgrades, downgrades, and other subscription purchase flows generate purchase tokens that must replace a previous purchase token. You must invalidate the purchase tokens that appear in the linkedPurchaseToken field of the Google Play Developer API. For more information, see Implementing linkedPurchaseToken correctly to prevent duplicate subscriptions.
  • Order numbers for subscription renewals contain an additional integer that represents a specific renewal instance. For example, an initial subscription Order ID might be GPA.1234-5678-9012-34567 with subsequent Order IDs being GPA.1234-5678-9012-34567..0 (first renewal), GPA.1234-5678-9012-34567..1 (second renewal), and so on.

Getting started

To start integrating Google Play's billing system with your app, see Getting ready.

More information

For more information about integrating Google Play's billing system into your app, see the following topics: