Google Play’s billing system | Android Developers

Google Play’s billing system is a service that enables you to sell digital products and content in your Android app, whether you want to monetize through one-time purchases or offer subscriptions to your services. Google Play offers a full set of APIs for integration with both your Android app and your server backend that unlock the familiarity and safety of Google Play purchases for your users .

Integration architecture

This section introduces the different functional modules that you can build and the APIs and libraries available to simplify the process .
Your Android app works with your developer backend and the Google
    Play backend (through Google Play Services).
Figure 1. Diagram of a typical Google Play billing
integration.

You can integrate Google Play’s billing system with your Android app using the Play Billing Library. This library enables communication with the Google Play Services layer that provides the localized product offering available to each user in your app, as well as methods to handle other necessary user operations, like launching the purchase flow and handling its outcome .

You should also integrate Google Play’s billing system with your server backend to
create the necessary developer flows. This is essential to guarantee that your
purchase management and cross-platform entitlements are efficient and secure.
You can create this integration with the Subscriptions and in-app purchases
API provided by
the Google Play Developer API. The backend integration also leverages some
Google Cloud platform tools.


Figure 2. APIs and services provided by the Google Play
Developer API.

Terminology

This section lists and describes the high-level technologies and concepts that you might encounter when integrating Google Play’s billing system into your app. Reference this list as you proceed through the integration guidance .

Technologies

Concepts

  • Flow. A flow shows the typical steps involved in a billing-related
    task. For example, a purchase flow outlines the steps
    involved when a user purchases your product. A subscription flow might show
    how a subscription transitions between states.
  • Entitlement. When a user purchases an in-app product, they are then
    entitled to that product within your app. For one-time products, this
    means that the user should now have permanent access to the product.
    For subscriptions, this means that the user should have access while
    the subscription is active.
  • Product ID. The ID of a specific product type.
  • Purchase token. A string that represents a buyer’s entitlement to a
    product on Google Play. It indicates that a Google user has paid for a
    specific product.
  • Order ID. A string that represents a financial transaction on Google Play.
    An order ID is created every time a financial transaction occurs. This string
    is included in a receipt that is emailed to the buyer. You can use the order
    ID to manage refunds in the Order Management section of the
    Google Play Console. Order IDs are also used in sales and payout
    reports.

We want your feedback ! You can let us know how we’re doing in any of the following ways :

  • For issues related to the Google Play Billing Library or the Google
    Developer API, file a bug through the
    Google Issue Tracker.
  • For issues related to the sample apps please, file an issue in the
    GitHub Issue Tracker.

Next steps

To begin integrating Google Play’s billing system with your app and server backend, see the setup guide .

Google Play’s billing system | Android Developers

Bài viết liên quan
Hotline 24/7: O984.666.352
Alternate Text Gọi ngay