Home | History | Annotate | Download | only in billing
      1 page.title=Subscriptions
      2 parent.title=In-app Billing
      3 parent.link=index.html
      4 @jd:body
      5 
      6 <div id="qv-wrapper">
      7 <div id="qv">
      8   <h2>Quickview</h2>
      9   <ul>
     10      <li>Users purchase your subscriptions from inside your apps, rather than 
     11 directly from Google Play.</li>
     12      <li>Subscriptions let you sell products with automated, recurring billing
     13 (monthly or annual).</li>
     14      <li>You can offer a configurable trial period for any subscription.</li>
     15 
     16   </ul>
     17   <h2>In this document</h2>
     18   <ol>
     19     <li><a href="#overview">Overview</a></li>
     20     <li><a href="#administering">Configuring Subscriptions Items</a></li>
     21     <li><a href="#cancellation">Cancellation</a></li>
     22     <li><a href="#payment">Payment Processing</a></li>
     23   </ol>
     24   <h2>See also</h2>
     25   <ol>
     26     <li><a href="{@docRoot}google/play/billing/billing_integrate.html#Subs">Implementing Subscriptions (V3)</a></li>
     27     <li><a href="https://developers.google.com/android-publisher/v1_1/">Google Play Android Developer API</a></li>
     28   </ol>
     29 </div>
     30 </div>
     31 
     32 <p>Subscriptions let you sell content, services, or features in your app with
     33 automated, recurring billing. You can easily adapt an existing In-app Billing 
     34 implementation to sell subscriptions.</p>
     35 <p>This document is focused on highlighting implementation details that are 
     36 specific to subscriptions, along with some strategies for the associated billing 
     37 and business models.</p>
     38 
     39 <h2 id="overview">Overview of Subscriptions</h2>
     40 <p>A <em>subscription</em> is a product type offered in In-app Billing that 
     41 lets you sell content, services, or features to users from inside your app with 
     42 recurring monthly or annual billing. You can sell subscriptions to almost any 
     43 type of digital content, from any type of app or game.</p>
     44 
     45 <p>As with other in-app products, you configure and publish subscriptions using
     46 the Developer Console and then sell them from inside apps installed on 
     47 Android devices. In the Developer console, you create subscription
     48 products and add them to a product list, then set a price and optional trial
     49 period for each, choose a billing interval (monthly or annual), and then 
     50 publish. For more information about using the Developer Console, see 
     51 <a href="#administering">Configuring Subscription Items</a>.</p>
     52 
     53 <p>When users purchase subscriptions in your apps, Google Play handles all 
     54 checkout details so your apps never have to directly process any financial 
     55 transactions. Google Play processes all payments for subscriptions through 
     56 Google Wallet, just as it does for standard in-app products and app purchases. 
     57 This ensures a consistent and familiar purchase flow for your users.</p>
     58 
     59 <img src="{@docRoot}images/in-app-billing/v3/billing_subscription_v3.png" style="float:right; border:4px solid ddd;">
     60 
     61 <p>After users have purchase subscriptions, they can view the subscriptions and 
     62 cancel them from the <strong>My Apps</strong> screen in the Play Store app or 
     63 from the app's product details page in the Play Store app. For more information 
     64 about handling user cancellations, see <a href="#cancellation">Subscription Cancellation</a>.</p>
     65 
     66 <p>In adddition to client-side API calls, you can use the server-side API for 
     67 In-app Billing to provide subscription purchasers with extended access to 
     68 content (for example, from your web site or another service).
     69 The server-side API lets you validate the status of a subscription when users
     70 sign into your other services. For more information about the API, see <a
     71 href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>. </p>
     72 
     73 <p>You can also build on your existing external subscriber base from inside your
     74 Android apps.</p>
     75 <ul>
     76 <li>If you sell subscriptions on a web site, for example, you can add
     77 your own business logic to your Android app to determine whether the user has
     78 already purchased a subscription elsewhere, then allow access to your content if
     79 so or offer a subscription purchase from Google Play if not.</li>
     80 <li>You can implement your own solution for sharing subscriptions across as 
     81 many different apps or products as you want. For example, you could sell a 
     82 subscription that gives a subscriber access to an entire collection of apps, 
     83 games, or other content for a monthly or annual fee. To implement this solution, 
     84 you could add your own business logic to your app to determine whether the user 
     85 has already purchased a given subscription and if so, allow access to your 
     86 content.</li>
     87 </ul>
     88 </p>
     89 
     90 <p>In general the same basic policies and terms apply to subscriptions as to
     91 standard in-app products, however there are some differences. For complete
     92 information about the current policies and terms, please read the <a
     93 href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en
     94 &answer=140504">policies document</a>.</p>
     95 
     96 <p>To learn about the minimum system requirements for 
     97 subscriptions, see the <a href="{@docRoot}google/play/billing/versions.html#Subs">Version Notes</a>.</p>
     98 
     99 <h2 id="administering">Configuring Subscription Items</h2>
    100 <p>To create and manage subscriptions, use the Developer Console to set up a 
    101 product list for the app then configure these attributes for each subscription 
    102 product:</p>
    103 
    104 <ul>
    105 <li>Purchase Type: always set to <strong>Subscription</strong></li>
    106 <li>Subscription ID:  An identifier for the subscription</li>
    107 <li>Publishing State: Unpublished/Published</li>
    108 <li>Language: The default language for displaying the subscription</li>
    109 <li>Title: The title of the subscription product</li>
    110 <li>Description: Details that tell the user about the subscription</li>
    111 <li>Price: USD price of subscription per recurrence</li>
    112 <li>Recurrence: monthly or yearly</li>
    113 <li>Additional currency pricing (can be auto-filled)</li>
    114 </ul>
    115 
    116 <p>For details on how to add and configure products in the Developer Console, 
    117 see <a href="{@docRoot}google/play/billing/billing_admin.html">Administering
    118 In-app Billing</a>.</p>
    119 
    120 <h3 id="pricing">Subscription pricing</h3>
    121 
    122 <p>When you create a subscription in the Developer Console, you can set a price
    123 for it in any available currencies. Each subscription must have a non-zero
    124 price. You can price multiple subscriptions for the same content differently
    125 &mdash; for example you could offer a discount on an annual subscription
    126 relative to the monthly equivalent. </p>
    127 
    128 <p class="caution"><strong>Important</strong>: To change the price of a 
    129 subscription, you can publish a new subscription product ID at a new price, 
    130 then offer it in your app instead of the original product. Users who have 
    131 already purchased will continue to be charged at the 
    132 original price, but new users will be charged at the new price.</p>
    133 
    134 <h3 id="user-billing">User billing</h3>
    135 
    136 <p>In the Developer Console, you can configure subscription products with 
    137 automated recurring billing at either of two intervals:</p>
    138 
    139 <ul>
    140   <li>Monthly &mdash; Google Play bills the customers Google Wallet account at
    141   the time of purchase and monthly subsequent to the purchase date (exact billing
    142   intervals can vary slightly over time)</li>
    143   <li>Annually &mdash; Google Play bills the customer's Google Wallet account at
    144   the time of purchase and again on the same date in subsequent years.</li>
    145 </ul>
    146 
    147 <p>Billing continues indefinitely at the interval and price specified for the
    148 subscription. At each subscription renewal, Google Play charges the user account
    149 automatically, then notifies the user of the charges afterward by email. Billing
    150 cycles will always match subscription cycles, based on the purchase date.</p>
    151 
    152 <p>Over the life of a subscription, the form of payment billed remains the same
    153 &mdash; Google Play always bills the same form of payment (such as credit card
    154 or by Direct Carrier Billing) that was originally used to purchase the
    155 subscription.</p>
    156 
    157 <p>When the subscription payment is approved by Google Wallet, Google Play
    158 provides a purchase token back to the purchasing app through the In-app Billing
    159 API. Your apps can store the token locally or pass it to your backend servers, 
    160 which can then use it to validate or cancel the subscription remotely using the
    161 <a
    162 href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>.</p>
    163 
    164 <p>If a recurring payment fails (for example, because the customers credit
    165 card has become invalid), the subscription does not renew. How your app is 
    166 notified depends on the In-app Billing API version that you are using:</p>
    167 <ul>
    168 <li>With In-app Billing Version 3, the failed or expired subscription is no longer 
    169 returned when you call {@code getPurchases}.</li>
    170 <li>With In-app Billing Version 2, Google Play notifies your app at the end of 
    171 the active cycle that the purchase state of the subscription is now "Expired". 
    172 </li>
    173 </ul>
    174 
    175 <p class="note"><strong>Recommendation</strong>: Include business logic in your 
    176 app to notify your backend servers of subscription purchases, tokens, and any 
    177 billing errors that may occur. Your backend servers can use the server-side API 
    178 to query and update your records and follow up with customers directly, if needed.</p>
    179 
    180 <h3 id="trials">Free trials</h3>
    181 
    182 <p>In the Developer Console, you can set up a free trial period that lets users
    183 try your subscription content before buying it. The trial period runs for the 
    184 period of time that you set and then automatically converts to a full 
    185 subscription managed according to the subscription's billing interval and 
    186 price.</p>
    187 
    188 <p>To take advantage of a free trial, a user must "purchase" the full
    189 subscription through the standard In-app Billing flow, providing a valid form of
    190 payment to use for billing and completing the normal purchase transaction.
    191 However, the user is not charged any money, since the initial period corresponds
    192 to the free trial. Instead, Google Play records a transaction of $0.00 and the
    193 subscription is marked as purchased for the duration of the trial period or
    194 until cancellation. When the transaction is complete, Google Play notifies users
    195 by email that they have purchased a subscription that includes a free trial
    196 period and that the initial charge was $0.00. </p>
    197 
    198 <p>When the trial period ends, Google Play automatically initiates billing
    199 against the credit card that the user provided during the initial purchase, at 
    200 the amount set
    201 for the full subscription, and continuing at the subscription interval. If
    202 necessary, the user can cancel the subscription at any time during the trial
    203 period. In this case, Google Play <em>marks the subscription as expired immediately</em>,
    204 rather than waiting until the end of the trial period. The user has not
    205 paid for the trial period and so is not entitled to continued access after
    206 cancellation.</p>
    207 
    208 <p>You can set up a trial period for a subscription in the Developer Console,
    209 without needing to modify or update your APK. Just locate and edit the
    210 subscription in your product list, set a valid number of days for the trial
    211 (must be 7 days or longer), and publish. You can change the period any time,
    212 although note that Google Play does not apply the change to users who have
    213 already "purchased" a trial period for the subscription. Only new subscription
    214 purchases will use the updated trial period. You can create one free trial
    215 period per subscription product.</p>
    216 
    217 <h3 id="publishing">Subscription publishing</h3>
    218 <p>When you have finished configuring your subscription product details in the
    219 Developer Console, you can publish the subscription in the app product list.</p>
    220 
    221 <p>In the product list, you can add subscriptions, in-app products, or both. You
    222 can add multiple subscriptions that give access to different content or
    223 services, or you can add multiple subscriptions that give access to the same
    224 content but for different intervals or different prices, such as for a
    225 promotion. For example, a news outlet might decide to offer both monthly and
    226 annual subscriptions to the same content, with annual having a discount. You can
    227 also offer in-app purchase equivalents for subscription products, to ensure that
    228 your content is available to users of older devices that do not support
    229 subscriptions.</p>
    230 
    231 <p>After you add a subscription or in-app product to the product list, you must
    232 publish the product before Google Play can make it available for purchase. Note
    233 that you must also publish the app itself before Google Play will make the
    234 products available for purchase inside the app. </p>
    235 
    236 <p class="caution"><strong>Important</strong>: You can remove the subscription 
    237 product from the product list offered in your app to prevent users from seeing 
    238 or purchasing it.</p>
    239 
    240 <h2 id="cancellation">Subscription Cancellation</h2>
    241 
    242 <p>Users can view the status of all of their subscriptions and cancel them if
    243 necessary from the <strong>My Apps</strong> screen in the Play Store app. 
    244 Currently, the In-app Billing API does not provide support for programatically 
    245 canceling subscriptions from inside the purchasing app.</p>
    246 
    247 <p>When the user cancels a subscription, Google Play does not offer a refund for
    248 the current billing cycle. Instead, it allows the user to have access to the
    249 cancelled subscription until the end of the current billing cycle, at which time
    250 it terminates the subscription. For example, if a user purchases a monthly
    251 subscription and cancels it on the 15th day of the cycle, Google Play will
    252 consider the subscription valid until the end of the 30th day (or other day,
    253 depending on the month).</p>
    254 
    255 <p>In some cases, the user may contact you directly to request cancellation of a
    256 subscription. In this and similar cases, you can use the server-side API to
    257 query and directly cancel the users subscription from your servers.
    258 
    259 <p class="caution"><strong>Important:</strong> In all cases, you must continue
    260 to offer the content that your subscribers have purchased through their
    261 subscriptions, for as long any users are able to access it. That is, you must
    262 not remove any subscribers content while any user still has an active
    263 subscription to it, even if that subscription will terminate at the end of the
    264 current billing cycle. Removing content that a subscriber is entitled to access
    265 will result in penalties. Please see the <a
    266 href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=140504">policies document</a> for more information. </p>
    267 
    268 <h3 id="uninstall">App uninstallation</h3>
    269 
    270 <p>When the user uninstalls an app that includes purchased subscriptions, the 
    271 Play Store app will notify the user that there are active subscriptions. If the 
    272 user chooses to continue with the uninstallation, the app is removed and the 
    273 subscriptions remain active and recurring billing continues. The user can return 
    274 to cancel the associated subscriptions at any time in the <strong>My Apps</strong> 
    275 screen of the Play Store app. If the user chooses to cancel the uninstallation, 
    276 the app and subscriptions remain as they were.</p>
    277 
    278 <h3 id="refunds">Refunds</h3>
    279 
    280 <p>With subscriptions, Google Play does not provide a refund window, so users 
    281 will need to contact you directly to request a refund.
    282 
    283 <p>If you receive requests for refunds, you can use the server-side API to
    284 cancel the subscription or verify that it is already cancelled. However, keep in
    285 mind that Google Play considers cancelled subscriptions valid until the end of
    286 their current billing cycles, so even if you grant a refund and cancel the
    287 subscription, the user will still have access to the content.
    288 
    289 <p class="caution"><strong>Important:</strong> Partial refunds for canceled
    290 subscriptions are not available at this time.</p>
    291 
    292 <h2 id="payment">Payment Processing and Policies</h2>
    293 
    294 <p>In general, the terms of Google Play allow you to sell in-app subscriptions
    295 only through the standard payment processor, Google Wallet. For purchases of 
    296 any subscription products, the transaction fee is the same as the transaction 
    297 fee for application purchases (30%).</p>
    298 
    299 <p>Apps published on Google Play that are selling subscriptions must use In-app
    300 Billing to handle the transaction and may not provide links to a purchase flow
    301 outside of the app and Google Play (such as to a web site).</p>
    302 
    303 <p>For complete details about terms and policies, see the <a
    304 href="http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=140504">policies
    305 document</a>.</p>
    306 
    307 <h3 id="orderId">Subscription order numbers</h3>
    308 
    309 <p>To help you track transactions relating to a given subscription, Google
    310 Wallet provides a base Merchant Order Number for all recurrences of the 
    311 subscription and denotes
    312 each recurring transaction by appending an integer as follows: </p>
    313 
    314 <p><span style="color:#777"><code style="color:#777">12999556515565155651.5565135565155651</code> (base order number)</span><br />
    315 <code>12999556515565155651.5565135565155651..0</code> (initial purchase orderID)<br />
    316 <code>12999556515565155651.5565135565155651..1</code> (first recurrence orderID)<br />
    317 <code>12999556515565155651.5565135565155651..2</code> (second recurrence orderID)<br />
    318 ...<br /></p>
    319 
    320 <p>Google Play provides the order number as the value of the 
    321 {@code orderId} field of the {@code INAPP_PURCHASE_DATA} JSON field (in V3) 
    322 or the {@code PURCHASE_STATE_CHANGED} intent (in V2).</p>
    323 
    324 <h2 id="play-dev-api">Google Play Android Developer API</h2>
    325 
    326 <p>Google Play offers an HTTP-based API that lets you remotely query the
    327 validity of a specific subscription at any time or cancel a subscription. The
    328 API is designed to be used from your backend servers as a way of securely
    329 managing subscriptions, as well as extending and integrating subscriptions with
    330 other services.</p>
    331 
    332 <p>For complete information, see <a href="{@docRoot}google/play/billing/gp-purchase-status-api.html">Purchase Status API</a>.</p>