diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs index b7701353cfb08..7cce86b36ec28 100644 --- a/docs/html/google/google_toc.cs +++ b/docs/html/google/google_toc.cs @@ -138,9 +138,6 @@
  • Administering In-app Billing
  • -
  • - Purchase Status API -
  • Version Notes
  • @@ -205,7 +202,9 @@
  • Filters on Google Play
  • - +
  • + Google Play Developer API +
  • Multiple APK Support
  • diff --git a/docs/html/google/play/billing/billing_subscriptions.jd b/docs/html/google/play/billing/billing_subscriptions.jd index d0e6dc58c2e42..3c72da1953c86 100644 --- a/docs/html/google/play/billing/billing_subscriptions.jd +++ b/docs/html/google/play/billing/billing_subscriptions.jd @@ -24,6 +24,7 @@ directly from Google Play.
  • Configuring Subscriptions Items
  • Cancellation
  • Payment Processing
  • +
  • Purchase Verification Strategies
  • See also

      @@ -325,6 +326,21 @@ each recurring transaction by appending an integer as follows:

      {@code orderId} field of the {@code INAPP_PURCHASE_DATA} JSON field (in V3) or the {@code PURCHASE_STATE_CHANGED} intent (in V2).

      +

      Purchase Verification Strategies

      + +

      In a typical scenario, your app verifies the order status for new purchases +to ensure that they are valid before granting access to the purchased +content.

      + +

      To verify a purchase, the app passes the purchase token and other details up +to your backend servers, which verifies them directly with Google Play using the +Purchase Status API. If the backend server determines that the purchase is +valid, it notifies the app and grants access to the content.

      + +

      Keep in mind that users will want the ability to use your app at any time, +including when there may be no network connection available. Make sure that your +approach to purchase verification accounts for the offline use-case.

      +

      Google Play Android Developer API

      Google Play offers an HTTP-based API that lets you remotely query the @@ -333,4 +349,4 @@ API is designed to be used from your backend servers as a way of securely managing subscriptions, as well as extending and integrating subscriptions with other services.

      -

      For complete information, see Purchase Status API.

      \ No newline at end of file +

      For complete information, see Purchase Status API.

      diff --git a/docs/html/google/play/billing/gp-purchase-status-api.jd b/docs/html/google/play/billing/gp-purchase-status-api.jd index 4cfacee3b415c..23a4e618f0e4c 100644 --- a/docs/html/google/play/billing/gp-purchase-status-api.jd +++ b/docs/html/google/play/billing/gp-purchase-status-api.jd @@ -1,38 +1,113 @@ -page.title=Purchase Status API -page.tags="In-app Billing", "Google Play", "inapp billing", "in app billing", "iab", "billing" +page.title=Google Play Developer API +page.tags="In-app Billing", "Google Play", "inapp billing", "in app billing", "iab", "billing", "publishing" @jd:body
      -

      Google Play provides an HTTP-based Purchase Status API that lets -you remotely query the status of a specific in-app product or subscription, -or cancel an active subscription. The API is designed to be used from your -backend servers as a way of securely managing in-app products and -subscriptions, as well as extending and integrating them with other services.

      +

      The Google Play Developer API is a REST-based web service that allows you to perform publishing +and app-management tasks. You can use this API to integrate your publishing +operations with your release-management process.

      -

      Overview

      +

      Not all developers will need to use these APIs—in most cases you will +continue to manage your apps directly using the Google Play Developer Console. +However, if you have a large number of APKs to manage, or have to track user +purchases and subscriptions, you may find this API very useful.

      -

      With the Purchase Status API you can quickly retrieve the details of any -purchase using a standard GET request. In the request you supply information -about the purchase — app package name, purchase or subscription ID, -and the purchase token. The server responds with a JSON object describing -the associated purchase details, order status, developer payload, and other -information.

      +

      Using the Google Play Developer API, you can automate a variety of +app-management tasks, including:

      + + + + + +

      The Google Play Developer API lets you focus on designing and developing your +app, while spending less time and effort managing your releases, even as you +grow to new markets.

      + +

      The Google Play Developer API includes two components:

      + + + +

      Publishing API

      + +

      +The Google Play Developer Publishing API allows you to automate frequent tasks +having to do with app distribution. This provides functions +similar to those available to a developer through the Google Play +Developer Console, such +as: +

      + + + +

      Those tasks are performed using the +edits +functionality, which takes a transactional approach to making changes — +you bundle several changes into a single draft edit, then commit the changes all +at once. (None of the changes take effect until the edit is committed.)

      + +

      Note: Not all developers will need to use this +API. All the functionality provided by the API is also available through the +Google Play +Developer Console. However, this API lets you integrate your app and listing +update process with your existing tools, which will be very useful for some +developers. In particular, if you have a large number of APKs to manage, or +localized listings in many different locales, you may find this API invaluable. +

      + +

      Subscriptions and In-App Purchases API

      + +

      The API allows you to manage your app's catalog of in-app products and +subscriptions. In addition, with the Subscriptions and In-App Purchases API you +can quickly retrieve the +details of any purchase using a standard GET request. In the request you supply +information about the purchase — app package name, purchase or +subscription ID, and the purchase token. The server responds with a JSON object +describing the associated purchase details, order status, developer payload, and +other information.

      You can use the Purchase Status API in several ways, such as for reporting and reconciliation of individual orders and for verifying purchases and @@ -40,101 +115,85 @@ subscription expirations. You can also use the API to learn about cancelled orders and confirm whether in-app products have been consumed, including whether they were consumed before being cancelled.

      -

      For subscriptions, in addition to querying for order status and expiration, -you can use the Purchase Status API to remotely cancel a subscription. This is a -convenient way to manage cancellations on behalf of customers, without -requiring them to manage the cancellation themselves on their Android devices.

      - -

      If you plan to use the Purchase Status API, keep in mind that:

      - +

      Note: The Subscriptions and In-App +Purchases API does not use the new, transactional "edits" functionality used by +the Publishing API. Methods for the +Inappproducts, +Purchases.products, +and Purchases.subscriptions +resources take effect immediately. Each resource's API reference page notes +specifically whether the methods for that resource use the "edits" +model.

      The Purchase Status API is part of the Google Play Android -Developer API v1.1, available through the Google Developers Console. The new version -of the API supersedes the v1 API, which is deprecated. If you are using the v1 -API, please migrate your operations to the v1.1 API as soon as possible.

      - +href="https://developers.google.com/android-publisher/">Google Play Developer +API v. 2.0, available through the Google Developers Console.

      Using the API

      -

      To use the API, you must first register a project at the Google Developers Console and receive -a Client ID and shared secret that your app will present when calling the -API. All calls are authenticated with OAuth 2.0.

      +

      To start making API calls, you’ll set up and manage the Google Play Developer +API directly from the Google +Play Developer Console. The API can only be managed by the owner of your +Google Play Developer account.

      -

      Once your app is registered, you can access the API directly, using standard -HTTP methods to retrieve and manipulate resources. The API is built on a RESTful -design that uses HTTP and JSON. so any standard web stack can send requests and -parse the responses. However, if you don’t want to send HTTP requests and parse -responses manually, you can access the API using the Google APIs Client -Libraries, which provide better language integration, improved security, -and support for making calls that require user authorization.

      +

      To access the API, you'll need to:

      -

      For more information about the API and how to access it through the Google -APIs Client Libraries, see the documentation at:

      +
      1. Set up a new or existing API project
      2. +
      3. Set up one or more authorized clients, which can be either: +
      -

      https://developers. -google.com/android-publisher/v1_1/

      +

      For full details, see the Google Play Developer API +Getting +Started page.

      -

      Quota

      +

      Staged Edits

      -

      Applications using the Google Play Android Developer API are limited to an -initial courtesy usage quota of 200,000 requests per day (per -application). This should provide enough access for normal -subscription-validation needs, assuming that you follow the recommendation in -this section.

      +

      The Google Play Developer Publishing API Edits methods allow you to prepare +and commit changes to your Google Play apps. Once your update is ready to go, +you can deploy it with a single operation. The changes you can make include:

      -

      If you need to request a higher limit for your application, see the -instructions in the Google Developers -Console Help. -Also, please read the section below on design best practices for minimizing your -use of the API.

      + -

      Authorization

      +

      Once all the desired changes have been staged, they are all committed with a +single operation.

      -

      Calls to the Google Play Android Developer API require authorization. Google -uses the OAuth 2.0 protocol to allow authorized applications to access user -data. To learn more, see Authorization -in the Google Play Android Developer API documentation.

      +

      For full details on staged edits, see the Google Play Developer API +Edits +page.

      -

      Purchase Verification Strategies

      - -

      In a typical scenario, your app verifies the order status for new purchases -to ensure that they are valid before granting access to the purchased content.

      - -

      To verify a purchase, the app passes the purchase token and other details up -to your backend servers, which verifies them directly with Google Play using the -Purchase Status API. For security reasons, the app should not normally attempt to verify -the purchase itself using the Purchase Status API.

      - -

      If the backend server determines that the purchase is valid, it notifies the -app and grants access to the content. For improved performance, the backend servers -should store the purchase details and order status in a local database, updated at -intervals or as-needed.

      - -

      Keep in mind that users will want the ability to use your app at any time, including -when there may be no network connection available. Make sure that your approach to -purchase verification accounts for the offline use-case.

      +

      Note: The new, transactional "edits" +functionality is only used by the Publishing +API. Methods for the Subscriptions and +In-App Purchases API take effect immediately. Each resource's API reference +page notes specifically whether the methods for that resource use the "edits" +model.

      Using the API Efficiently

      -

      Access to the Google Play Android Developer API is regulated to help ensure a -high-performance environment for all applications that use it. While you can +

      Access to the Google Play Developer API is regulated to help ensure a +high-performance environment for all applications that use it (as described in +Quota). While you can request a higher daily quota for your application, we highly recommend that you -minimize your access using the techniques below.

      +minimize your access using these techniques:

      By following those general guidelines, your implementation will offer the -best possible performance for users and minimize use of the Google Play Android -Developer API.

      +best possible performance for users.

      + +

      Quota

      + +

      Applications using the Google Play Developer API are limited to an +initial courtesy usage quota of 200,000 requests per day (per +application). This should provide enough access for publishing activities and +normal subscription-validation needs.

      + +

      If you need to request a higher limit for your application, use the "Request +more" link on the Quotas +pane of the Google Developers Console.

      diff --git a/docs/html/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd index dce20cb8ef3f4..18b15233029f4 100644 --- a/docs/html/google/play/billing/index.jd +++ b/docs/html/google/play/billing/index.jd @@ -14,7 +14,11 @@ and features, and more. You can use In-app Billing to sell products as

      - \ No newline at end of file +
      +

      + Google Play Developer API +

      +

      Integrate your publishing operations with your release-management + process. +

      Learn more » +
      +