Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / articles / arc_in_app_payments.html
blob6a47538cc861603fbe841c2c972ecae196ee8e85
1 <h1>In-app Purchases for ARC Apps</h1>
3 <p>
4 As of Chrome 44, you can enable In-app Purchases in <a
5 href="getstarted_arc">your ARC app</a>. This article explains how.
6 </p>
8 <p class="note">
9 <b>Note</b>:
10 In-app payments for ARC apps are subject to a 30% transaction fee.
11 For example, if you charge $1.99 for an item offered in an ARC app, you’ll receive $1.39.
12 This is to ensure a consistent pricing structure with in-app payments made in apps available on Google Play.
13 Paid ARC apps are currently not supported.
14 </p>
16 <h2 id="getstarted">Getting started</h2>
17 <p>
18 If your app uses <a
19 href="https://developer.android.com/google/play/billing/index.html"> In-app
20 Billing</a> on Android, you have probably created a product list in the Google
21 Play Developer Console. You will need to recreate your product list in the
22 Chrome Web Store Developer Dashboard. Go to the <a
23 href="https://chrome.google.com/webstore/developer/dashboard"> Developer
24 Dashboard</a> and edit your app. Click on the <strong>In-app Products</strong>
25 tab and create the list of your products. At this time, ARC apps can only use
26 <strong>managed per user account</strong> in-app products. Other <a
27 href="https://developer.android.com/google/play/billing/api.html#producttype">product
28 types</a> like <strong>unmanaged</strong> and <strong>subscription</strong> are
29 not supported. It is recommended to use the same product IDs (SKU); this way you
30 do not have to change product IDs in your code.
31 </p>
33 <p>
34 If you do <a
35 href="https://developer.android.com/google/play/billing/billing_integrate.html#billing-security">signature
36 verification</a> in your app, you need to use the public key generated by the
37 Chrome Web Store, not the one generated by Google Play. You can get the public
38 key from the <strong>More info</strong> link in the Developer Dashboard. To
39 avoid maintaining two versions of your app, you can verify signatures using both
40 Chrome Web Store and Google Play public keys and use the one that succeeds.
41 Alternatively, you can use the proper public key based on
42 <code>android.os.Build.BRAND</code> or
43 <code>android.os.Build.MANUFACTURER</code>, which is set to
44 <strong>chromium</strong> for ARC.
45 </p>
47 <p>
48 Keep in mind that the Chrome Web Store and Google Play do not link your ARC app
49 and your Android app together in any way. So, it is recommended that you consume
50 managed items as soon as possible and sync the result of the consumption via
51 your own servers or other mediums. This way, a user that has installed your app
52 on a Chrome OS and an Android device sees a consistent state of your app and
53 their purchases between different devices.
54 </p>
56 <p class="note">
57 <b>Note</b>:
58 Do not use <a
59 href="https://developer.android.com/google/play/billing/billing_best_practices.html#payload">payload
60 strings</a> when making purchase requests. ARC ignores them.
61 </p>
63 <h2 id="testing">Testing your app</h2>
64 To test the in-app billing experience, review the <a
65 href="https://developer.chrome.com/webstore/payments-iap#testing">Testing
66 purchases</a> section of the Chrome Web Store API. You can learn about adding
67 trusted testers when you <a
68 href="https://developer.chrome.com/webstore/publish#testaccounts">publish your
69 app here</a>.
70 </p>