<h3 id="payload">Set the developer payload string when making purchase requests</h3>
<p>With the In-app Billing Version 3 API, you can include a 'developer payload' string token when sending your purchase request to Google Play. Typically, this is used to pass in a string token that uniquely identifies this purchase request. If you specify a string value, Google Play returns this string along with the purchase response. Subsequently, when you make queries about this purchase, Google Play returns this string together with the purchase details.</p>
<p>You should pass in a string token that helps your application to identify the user who made the purchase, so that you can later verify that this is a legitimate purchase by that user. For consumable items, you can use a randomly generated string, but for non-consumable items you should use a string that uniquely identifies the user.</p>
<p>When you get back the response from Google Play, make sure to verify that the developer payload string matches the token that you sent previously with the purchase request. As a further security precaution, you should perform the verification on your own secure server.</p>
<p>With the In-app Billing Version 3 API, you can include a 'developer payload'
string token when sending your purchase request to Google Play. Typically, this
is used to pass in a string token that uniquely identifies this purchase request.
If you specify a string value, Google Play returns this string along with the
purchase response. Subsequently, when you make queries about this purchase,
Google Play returns this string together with the purchase details.</p>
<p>You should pass in a string token that helps your application to identify the user who
made the purchase, so that you can later verify that this is a legitimate purchase by
that user. For consumable items, you can use a randomly generated string, but for non-
consumable items you should use a string that uniquely identifies the user.</p>
<p>When you get back the response from Google Play, make sure to verify that the
developer payload string matches the token that you sent previously with the purchase
request. As a further security precaution, you should perform the verification on your
own secure server.</p>
<h3 id="trademark">Take action against trademark and copyright infringement</h3>
<p>If you see your content being redistributed on Google Play, act quickly and decisively. File a
products that are owned by the user has been sent to your app.
</p>
<p>For more information about the data returned by {@code getPurchases}, see <a href="{@docRoot}google/play/billing/billing_reference.html#getPurchases">In-app Billing Reference</a>. The following example shows how you can retrieve this data from the response.</p>
<p>For more information about the data returned by {@code getPurchases}, see
position of the EU consumer protection authorities</a> for more information on this and other
topics.
</p>
<h2 id="api">In-app Billing API</h2>
@@ -65,7 +67,9 @@ must be able to access the Google Play server over the network.</p>
<p>In-app billing Version 3 is the latest version, and maintains very broad
compatibility across the range of Android devices. In-app Billing Version 3 is
supported on devices running Android 2.2 or higher that have the latest version
of the Google Play store installed (<a href="{@docRoot}about/dashboards/index.html">a vast majority</a> of active devices).</p>
of the Google Play store installed (<a
href="{@docRoot}about/dashboards/index.html">a vast majority</a> of active
devices).</p>
<h4>Version 3 features</h4>
<ul>
@@ -107,7 +111,9 @@ the Google Play Developer Console.</p>
<p>You can specify these types of products for your In-app Billing application
— <em>managed in-app products</em> and <em>subscriptions</em>. Google Play
handles and tracks ownership for in-app products and subscriptions on your
application on a per user account basis. <a href="{@docRoot}google/play/billing/api.html#producttypes">Learn more about the product types supported by In-app Billing Version 3</a>.</p>
application on a per user account basis.
<a href="{@docRoot}google/play/billing/api.html#producttypes">Learn more about
the product types supported by In-app Billing Version 3</a>.</p>
<h2 id="console">Google Play Developer Console</h2>
<p>The Developer Console is where you can publish your
@@ -146,7 +152,9 @@ Google Play.</p>
provides a sample application that demonstrates how to sell in-app products and subscriptions
from inside an app.</p>
<p>The <a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">TrivialDrive sample for the Version 3 API</a> sample shows how to use the In-app Billing Version 3 API
<p>This documentation provides technical reference information for using the In-app Billing Version 3 API. </p>
<p>This documentation provides technical reference information for using the
In-app Billing Version 3 API. </p>
<h2 id="billing-codes">Server Response Codes</h2>
<p>The following table lists all of the server response codes that are sent from Google Play to your application. Google Play sends the response code synchronously as an integer mapped to the {@code RESPONSE_CODE} key in the response {@code Bundle}. Your application must handle all of these response codes.</p>
<p>
The following table lists all of the server response codes that are sent from
Google Play to your application. Google Play sends the response code
synchronously as an integer mapped to the {@code RESPONSE_CODE} key in the
response {@code Bundle}. Your application must handle all of these response
<td>Invalid arguments provided to the API. This error can also indicate that the application was not correctly signed or properly set up for In-app Billing in Google Play, or does not have the necessary permissions in its manifest</td>
<td>Invalid arguments provided to the API. This error can also indicate that
the application was not correctly signed or properly set up for In-app
Billing in Google Play, or does not have the necessary permissions in its
manifest</td>
</tr>
<tr>
<td>{@code BILLING_RESPONSE_RESULT_ERROR}</td>
@@ -90,13 +99,23 @@ parent.link=index.html
</table>
<h2 id="billing-interface">API Reference</h2>
<p>The In-app Billing Version 3 API is defined in the {@code IInAppBillingService.aidl} file, which is included with the Version 3 <a href="{@docRoot}training/in-app-billing/preparing-iab-app.html#GetSample">sample application</a>.</p>
<p>The In-app Billing Version 3 API is defined in the {@code
IInAppBillingService.aidl} file, which is included with the Version 3
<p>This method returns product details for a list of product IDs. In the response {@code Bundle} sent by Google Play, the query results are stored in a String {@code ArrayList} mapped to the {@code DETAILS_LIST} key. Each String in the details list contains product details for a single product in JSON format. The fields in the JSON string with the product details are summarized in table 2.</p>
<p>
This method returns product details for a list of product IDs. In the
response {@code Bundle} sent by Google Play, the query results are stored in
a String {@code ArrayList} mapped to the {@code DETAILS_LIST} key. Each
String in the details list contains product details for a single product in
JSON format. The fields in the JSON string with the product details are
<td>The item's product identifier. Every item has a product ID, which you must specify in the application's product list on the Google Play Developer Console.</td>
<td>The item's product identifier. Every item has a product ID, which you
must specify in the application's product list on the Google Play
Developer Console.</td>
</tr>
<tr>
<td>{@code purchaseTime}</td>
@@ -330,8 +352,13 @@ subscriptions.</p>
</tr>
<tr>
<td>{@code INAPP_CONTINUATION_TOKEN}</td>
<td>String containing a continuation token to retrieve the next set of in-app products owned by the user. This is only set by the Google Play service if the number of products owned by the user is very large. When a continuation token is present in the response, you must make another call to {@code getPurchases} and pass in the continuation token that you received. The subsequent {@code getPurchases} call returns more purchases and possibly another continuation token.</td>
<td>String containing a continuation token to retrieve the next set of
in-app products owned by the user. This is only set by the Google Play
service if the number of products owned by the user is very large. When a
continuation token is present in the response, you must make another call
to {@code getPurchases} and pass in the continuation token that you
received. The subsequent {@code getPurchases} call returns more purchases