Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.
This page is deprecated. It covers a legacy version of the plugin and is no longer maintained.For new implementations, or to upgrade to the latest Google Play Billing Library as Google recommends, use the Google In-App Purchases guide.
Accept payments within your app using Google Play’s Billing Library to facilitate transactions such as one-time purchase, subscription, or promo code redemption.In-App Purchases (IAP) provide additional channels to monetize your app. Google Play allows for standard user-initiated in-app purchases and auto-renewing subscription purchases.Generally, if your app accepts payment for any digital goods or memberships, Google Play requires you to offer in-app purchases as an option for digital content, unless such content can also be consumed outside of the app. You are still free to implement other payment methods on your website separate from the mobile apps.Median’s Google Play In-App Purchase flow includes these steps:
Create In-App Purchase items in the Google Play Console website
Host a JSON file on your website with a list of purchasable items
Display a web UI listing purchasable items
Initiate a purchase when requested by a user
Verify and fulfill purchase through Google Play
Provide users with subscription management
Configure IAP in Google Play Console
Create your app in the Google Play Console. The package name of your app is a globally unique identifier that identifies your app on Google Play. Your account “claims” that package name the first time you upload your app to the Google Play Console. Make sure that any pages with gray checkmarks are completed so that the checkmark turns green. The app must be fully configured in Google Play before you can create and test in-app purchases.In the Google Play Console, go to Store Presence -> In-App Products. Create either a Managed product (standard in-app purchase), or a Subscription. The product id will be used later in code to identify the item. Title and description are used in Google Play listings, and will also be passed to your app. If you wish to have different tiers of subscriptions (e.g. a monthly and annual subscription), they must be created as separate subscriptions.
Host a JSON file with available products
Create a JSON file that lists the product IDs you would like to offer for sale. This allows you to in real time add or remove products without publishing a new version of your app. The following example shows three products for sale: a regular in-app purchase, and two subscription products. The product IDs for each must be placed in the correct section: inappProducts vs subProducts.
Now you are ready to enable and configure the plugin within the Native Plugins tab of App Studio. You need to enter productsUrl. The productsUrl should point to the JSON file on your website. When your app launches, it will make an HTTP GET request to your productsUrl.
Purchased products and IAP status
The app will verify the list of products with Google Play and retrieve each product’s information. Then it will execute a JavaScript function on your website defined as median_info_ready with a single object parameter. Alternatively you can use the Median JavaScript Bridge to obtain this data at runtime by calling the method median.iap.info().You define this function on your page, but don’t call it. If present on a page, it will be called by the app when the page is loaded.
function median_info_ready(inAppPurchases) { console.log(inAppPurchases);}
Or you may return the purchase data at runtime via a promise (in async function)
var purchaseData = await median.iap.info();console.log(purchaseData);
productID: the identifier set in Google Play that matches those in the productsUrl.
type: “inapp” or “subs”
price: the price you should display to your user. It will be localized to their currency.
price_amount_micros: the price in micro-units, e.g. 1 USD = 1000000 micros.
price_currency_code: the 3-letter currency code
title: from Google Play Console
description: from Google Play Console
Display web UI for purchases
Create a page on your website that shows the available items for purchase. It should wait for the median_info_ready function to be called and then populate the items for purchase. The price must be shown using the price string, as different users may have different language and currency settings.
Initiate purchase
When a user decides to purchase an IAP, run the JavaScript function:
median.iap.purchase({ productID: "product_id" });
The Median app will then start the in-app purchase flow.The median.iap.purchase({'productID': 'product_id'}); call supports these additional parameters for auto-renewing subscriptions:
previousProductID – the product ID we are replacing. This is required to support subscription upgrades and downgrades (i.e. converting a monthly subscription to annual, or changing a subscription tier from basic to premium membership).
previousProductID is no longer accepted for purchase. Instead, use previousPurchaseToken. If this field is empty, the prorationMode is also ignored
The history/details of purchase now contain a list of Product IDs. Like how the library kept the productID field (which is the first item of the list), we also kept the productID in our response data for compatibility support. Hence, the web component shall get both productID and productIDs for median_iap_purchases
prorationMode – determines how to credit the user for a mid-period subscription change. Valid values include:
IMMEDIATE_WITH_TIME_PRORATION – Replacement takes effect immediately, and the remaining time will be prorated and credited to the user. This is the current default behavior.
IMMEDIATE_AND_CHARGE_PRORATED_PRICE - Replacement takes effect immediately, and the billing cycle remains the same. The price for the remaining period will be charged. This option is only available for subscription upgrade.
IMMEDIATE_WITHOUT_PRORATION – Replacement takes effect immediately, and the new price will be charged on next recurrence time. The billing cycle stays the same.
DEFERRED - Replacement takes effect when the old plan expires, and the new price will be charged at the same time.
On app launch, and after any purchases are made, the app will call a JavaScript function on your page named median_iap_purchases with a single object parameter. Here is an example object:
purchaseString: “purchased”, “canceled”, “pending”, or “unknown”
acknowledged: indicates the app has confirmed the purchase with Google Play
autoRenewing: indicates the purchase will autorenew. Note that this will be set to false if the user cancels their subscription.
purchaseToken: a string that can be used to verify the purchase with Google.
The allPurchases array will list all current subscriptions. Any expired subscriptions will not longer appear.
Subscription management
You may wish to provide links for your users to manage their subscriptions.To open the Google Play page that lists all subscriptions for all of the user’s apps (not just your app), open the URL:
median.iap.manageAllSubscriptions();
To allow the user to manage just your app’s subscription with the specified product ID, open the URL:
Testing your in-app purchase flow requires your app be properly set up in Google Play to be distributed.Your test devices (including emulators) must have Google Play Store installed and be signed into a Gmail or Google Apps for Business account. You may use your day-to-day account. In your Developer Account -> Account details, go to the License Testing section. Add the email addresses for the test accounts.On your app’s management page, create an internal test track. Add the test user email to a user list. Once added, each test user go to the Opt-in URL (looks like https://play.google.com/apps/internaltest/1234321234...) and accept the Opt-In. Create a release build (or use the Median-built apk) and upload it to the internal test track. The test users should then be able to find the app in the Google Play Store on their devices and install it.Subsequent releases to the internal test track will immediately be available to the test devices by checking for new updates in the Google Play Store app.Any in-app purchases can be tested without actual payment being exchanged. Auto-renewing subscriptions will renew every 5 minutes until they are canceled.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Median Docs","description":"Median docs: convert websites and web apps into native iOS and Android apps with App Studio, the JavaScript Bridge, and native plugins.","colors":{"primary":"#1174D3","light":"#4299ED","dark":"#1174D3"},"logo":{"light":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-light.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=1da14bface36d3c440889b1a3b1df5f7","dark":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-dark.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=90c7e5a9a9435eb9b015af64906bbf61","href":"/docs/overview"},"favicon":{"light":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/favicon-black.png?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=c823e2fd7c0e26943949dd47b8e99786","dark":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/favicon-black.png?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=c823e2fd7c0e26943949dd47b8e99786"},"background":{"color":{"light":"#FFFFFF","dark":"#0E0D08"}},"navbar":{"links":[{"icon":"handshake","href":"/docs/support","label":"Support"},{"icon":"headset","href":"https://median.co/contact?topic=general-inquiry\u0026utm_source=docs\u0026utm_medium=navbar","label":"Talk to Us"}],"primary":{"type":"button","label":"Create New App","href":"https://median.co/new"}},"footer":{"socials":{"github":"https://github.com/gonativeio"},"links":[{"header":"Legal","items":[{"label":"Online Terms","href":"https://median.co/terms"},{"label":"Privacy Policy","href":"https://median.co/privacy"}]}]},"search":{"prompt":"Search the Median docs..."},"seo":{"metatags":{"canonical":"https://docs.median.co","og:site_name":"Median Docs","og:type":"website","twitter:card":"summary_large_image"},"indexing":"navigable"},"fonts":{"family":"DM Sans"},"integrations":{"clarity":{"projectId":"xcavaibynk"},"ga4":{"measurementId":"G-JHTZNFF295"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"median-co","hasAudioNarration":false,"actualSubdomain":"median-co","customDomains":["docs.median.co"],"gitSource":{"type":"github","owner":"gonativeio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10feec9ffae5051c41d0b7"},"feedback":{"thumbs":true,"agentFeedback":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b140d736e4c9d258537cd6a","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Documentation","count":248},{"language":"default","tag":"Native Plugins","count":67},{"language":"default","tag":"Build \u0026 test","count":30},{"language":"default","tag":"Push notifications","count":26},{"language":"default","tag":"Native navigation","count":25},{"language":"default","tag":"Website builders","count":23},{"language":"default","tag":"Interface","count":18},{"language":"default","tag":"Native functionality","count":17},{"language":"default","tag":"Median JavaScript Bridge","count":16},{"language":"default","tag":"Authentication","count":14}],"searchSettings":{"showContentSnippets":false,"isFiltersEnabled":false,"maxResults":5,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":true},"customCss":[{"filePath":"changelog-tags.css","content":"[data-component-part=\"update-tag\"][data-tag-kind]{display:inline-flex;align-items:center;padding:0.125rem 0.5rem;border-radius:9999px;font-size:0.75rem;line-height:1.25rem;font-weight:500;color:#1a100b;border:1px solid transparent}[data-component-part=\"update-tag\"][data-tag=\"new-feature\"]{background:#b5daff}[data-component-part=\"update-tag\"][data-tag=\"bug-fix\"]{background:#feb9ff}[data-component-part=\"update-tag\"][data-tag=\"maintenance\"]{background:#ffefb4}[data-component-part=\"update-tag\"][data-tag-kind=\"platform\"]{background:transparent;border-color:#1a100b}.dark [data-component-part=\"update-tag\"][data-tag=\"new-feature\"]{background:#4299ed}.dark [data-component-part=\"update-tag\"][data-tag=\"bug-fix\"]{background:#f567f0}.dark [data-component-part=\"update-tag\"][data-tag=\"maintenance\"]{background:#f7c406}.dark [data-component-part=\"update-tag\"][data-tag-kind=\"platform\"]{color:#f2f0ee;border-color:#f2f0ee}#changelog-filters [data-tag-kind]::before{content:\"\";display:inline-block;width:0.5rem;height:0.5rem;margin-right:0.4rem;border-radius:9999px;vertical-align:middle}#changelog-filters [data-tag=\"new-feature\"]::before{background:#4299ed}#changelog-filters [data-tag=\"bug-fix\"]::before{background:#f567f0}#changelog-filters [data-tag=\"maintenance\"]::before{background:#f7c406}#changelog-filters [data-tag-kind=\"platform\"]::before{background:transparent;box-shadow:inset 0 0 0 1.5px #1a100b}.dark #changelog-filters [data-tag-kind=\"platform\"]::before{box-shadow:inset 0 0 0 1.5px #f2f0ee}html:is([data-current-path=\"/docs/changelog\"],[data-current-path=\"/docs/changelog-archive\"]){--sidebar-width: 0px}html:is([data-current-path=\"/docs/changelog\"],[data-current-path=\"/docs/changelog-archive\"]) [data-layout-item=\"sidebar\"]{display:none}"}]}
{"page":{"pagePath":"docs/google-iap-legacy","slug":"/docs/google-iap-legacy","pageMetadata":{"title":"Google In-App Purchases (legacy)","description":"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.","deprecated":true,"keywords":["Google In-App Purchases","legacy","IAP","Google Play Billing","deprecated"],"searchable":true,"href":"/docs/google-iap-legacy"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const MedianLogo=()=>{return _jsx(`div`,{className:`not-prose mint-text-gray-900 dark:mint-text-white`,style:{textAlign:`left`},children:_jsxs(`svg`,{width:`224`,height:`32`,viewBox:`0 0 224 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,\"aria-label\":`Median JavaScript Bridge`,style:{isolation:`isolate`},children:[_jsx(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.1135 0H0V10.4055C0 12.685 1.84789 14.5329 4.12739 14.5329H7.12043V18.3325C7.12043 20.612 8.96833 22.4599 11.2478 22.4599H14.8882V25.599C14.8882 27.8785 16.7361 29.7264 19.0156 29.7264H29.129V19.3209C29.129 17.0414 27.2812 15.1935 25.0017 15.1935H21.3613V12.0544C21.3613 9.77493 19.5134 7.92703 17.2339 7.92703H14.2409V4.12739C14.2409 1.84789 12.393 0 10.1135 0Z`,fill:`white`}),_jsx(`g`,{style:{mixBlendMode:`multiply`},children:_jsx(`path`,{d:`M14.8882 19.3207C14.8882 17.0413 16.7361 15.1934 19.0156 15.1934H25.0017C27.2812 15.1934 29.1291 17.0413 29.1291 19.3207V29.7263H19.0156C16.7361 29.7263 14.8882 27.8784 14.8882 25.5989V19.3207Z`,fill:`#F7C406`})}),_jsx(`g`,{style:{mixBlendMode:`multiply`},children:_jsx(`rect`,{x:`7.12061`,y:`7.92725`,width:`14.2409`,height:`14.5329`,rx:`4.12739`,fill:`#F567F0`})}),_jsx(`g`,{style:{mixBlendMode:`multiply`},children:_jsx(`path`,{d:`M0 0H10.1135C12.393 0 14.2409 1.84789 14.2409 4.12739V10.4055C14.2409 12.685 12.393 14.5329 10.1135 14.5329H4.12739C1.84789 14.5329 0 12.685 0 10.4055V0Z`,fill:`#4299ED`})}),_jsx(`path`,{d:`M54.9869 22.3729L47.7122 7.40723H44.1079V30.1189H47.5199V14.0866L53.5926 26.4446H56.6005L62.3337 14.1848V30.1189H65.7441V7.40723H62.1384L54.9869 22.3729Z`,fill:`currentColor`}),_jsx(`path`,{d:`M81.856 13.678C80.6045 12.8631 79.0916 12.4502 77.3488 12.4502C75.6375 12.4502 74.1246 12.8631 72.8596 13.678C71.5983 14.4556 70.5784 15.5821 69.9178 16.9271C69.2297 18.3202 68.8808 19.8623 68.9007 21.4225C68.8856 22.9888 69.2467 24.5349 69.9524 25.9256C70.6606 27.2738 71.7083 28.4045 72.9873 29.2008C74.2778 29.9881 75.7983 30.3872 77.5065 30.3872C79.5092 30.3872 81.1739 29.8899 82.454 28.9076C83.731 27.9301 84.7109 26.6029 85.28 25.0799L85.5459 24.3785H81.8815L81.7313 24.6486C81.345 25.3789 80.7881 26.0005 80.1102 26.4581C79.4266 26.9032 78.5597 27.1288 77.5306 27.1288C76.638 27.1508 75.7547 26.9395 74.9644 26.5149C74.2472 26.0967 73.6391 25.5081 73.1916 24.799C72.854 24.2174 72.6086 23.585 72.4644 22.9251H85.7863V21.4271C85.8073 19.8679 85.4589 18.3267 84.7707 16.9348C84.1193 15.5901 83.1088 14.461 81.856 13.678ZM72.541 19.59C72.7895 18.5996 73.2927 17.6951 73.9984 16.9701C74.8473 16.1214 75.9515 15.7085 77.3608 15.7085C78.7701 15.7085 79.8743 16.1214 80.7247 16.9701C81.4465 17.684 81.955 18.5925 82.1911 19.59H72.541Z`,fill:`currentColor`}),_jsx(`path`,{d:`M101.475 14.4765C101 14.0104 100.464 13.6142 99.8822 13.2993C98.8726 12.7361 97.6496 12.4506 96.2463 12.4506C94.5937 12.4506 93.1258 12.8634 91.8758 13.6784C90.6466 14.4712 89.654 15.5935 89.0062 16.9229C88.3181 18.316 87.9692 19.8581 87.9891 21.4183C87.9742 22.9763 88.3223 24.5156 89.0047 25.9091C89.6574 27.2449 90.6482 28.3779 91.8743 29.1904C93.1243 29.9808 94.5937 30.3814 96.2403 30.3814C97.6421 30.3814 98.8665 30.0959 99.8732 29.5357C100.455 29.2232 100.994 28.833 101.475 28.3755V30.1266H104.885V6.1626H101.475V14.4765ZM101.009 18.5222C101.414 19.4304 101.62 20.4186 101.61 21.4168C101.615 22.414 101.41 23.4008 101.009 24.3098C100.635 25.1443 100.041 25.8551 99.2917 26.3618C98.5691 26.8683 97.6526 27.1292 96.5664 27.1292C95.4801 27.1292 94.5652 26.8714 93.7989 26.3618C93.0337 25.8559 92.4197 25.1443 92.0246 24.3052C91.6073 23.4024 91.3942 22.4152 91.4011 21.4168C91.3891 20.4185 91.6019 19.4307 92.0231 18.5298C92.4191 17.6917 93.0335 16.9811 93.7989 16.4763C94.5652 15.9668 95.4966 15.7089 96.5664 15.7089C97.6361 15.7089 98.5691 15.9652 99.2962 16.4763C100.043 16.982 100.636 17.6906 101.009 18.5222Z`,fill:`currentColor`}),_jsx(`path`,{d:`M111.695 12.7129H108.283V30.1204H111.695V12.7129Z`,fill:`currentColor`}),_jsx(`path`,{d:`M127.594 14.4761C127.118 14.0109 126.583 13.6147 126.001 13.2989C124.992 12.7357 123.767 12.4502 122.364 12.4502C120.711 12.4502 119.245 12.8631 117.995 13.678C116.766 14.4712 115.774 15.5934 115.125 16.9225C114.437 18.3155 114.088 19.8577 114.108 21.4179C114.093 22.9759 114.441 24.5152 115.124 25.9087C115.778 27.2455 116.771 28.379 117.999 29.1916C119.249 29.982 120.717 30.3826 122.356 30.3826C123.76 30.3826 124.984 30.0971 125.989 29.5369C126.57 29.2219 127.107 28.8291 127.586 28.3689V30.1201H130.997V12.7203H127.586L127.594 14.4761ZM127.128 18.5218C127.531 19.4307 127.733 20.4188 127.722 21.4164C127.729 22.4131 127.527 23.3998 127.128 24.3094C126.755 25.1439 126.16 25.8547 125.411 26.3614C124.688 26.8679 123.772 27.1288 122.684 27.1288C121.596 27.1288 120.684 26.871 119.917 26.3614C119.153 25.857 118.539 25.1476 118.144 24.311C117.726 23.4083 117.513 22.421 117.52 21.4225C117.509 20.4244 117.721 19.4369 118.141 18.5356C118.537 17.6978 119.152 16.9874 119.917 16.4821C120.684 15.9725 121.614 15.7147 122.684 15.7147C123.754 15.7147 124.688 15.971 125.415 16.4821C126.16 16.9866 126.753 17.6928 127.128 18.5218Z`,fill:`currentColor`}),_jsx(`path`,{d:`M148.541 15.9204C147.95 14.8222 147.06 13.9236 145.977 13.3343C144.953 12.75 143.799 12.4455 142.626 12.4503C141.23 12.4503 140.061 12.7572 139.149 13.3512C138.671 13.6648 138.223 14.0245 137.812 14.4255V12.7204H134.401V30.1186H137.812V20.1717C137.794 19.359 137.991 18.5563 138.381 17.8481C138.759 17.1885 139.301 16.6426 139.951 16.2657C140.621 15.8898 141.375 15.6979 142.139 15.7086C143.327 15.7086 144.265 16.1046 145.008 16.9241C145.752 17.7437 146.119 18.7781 146.119 20.138V30.114H149.529V20.0735C149.535 18.4344 149.199 17.0331 148.541 15.9204Z`,fill:`currentColor`}),_jsx(`path`,{d:`M109.989 5.97803C109.444 5.97843 108.922 6.19956 108.537 6.59289C108.151 6.98621 107.934 7.51962 107.934 8.07607V8.11597C107.948 8.66279 108.171 9.18224 108.555 9.56377C108.938 9.9453 109.453 10.1588 109.988 10.1588C110.524 10.1588 111.038 9.9453 111.422 9.56377C111.805 9.18224 112.028 8.66279 112.043 8.11597V8.07146C112.041 7.51608 111.824 6.98408 111.439 6.59179C111.054 6.1995 110.533 5.97884 109.989 5.97803Z`,fill:`currentColor`}),_jsx(`path`,{d:`M159.807 19.7098C159.127 19.7098 158.58 19.5198 158.167 19.1398C157.76 18.7532 157.557 18.2065 157.557 17.4998H158.837C158.844 17.8265 158.92 18.0865 159.067 18.2798C159.214 18.4732 159.45 18.5698 159.777 18.5698C160.084 18.5698 160.307 18.4798 160.447 18.2998C160.587 18.1132 160.657 17.8698 160.657 17.5698V12.5898H161.937V17.5698C161.937 18.2565 161.744 18.7865 161.357 19.1598C160.977 19.5265 160.46 19.7098 159.807 19.7098ZM163.046 19.5898L165.606 12.5898H167.046L169.606 19.5898H168.246L167.686 17.9698H164.956L164.386 19.5898H163.046ZM165.306 16.9698H167.336L166.316 14.0598L165.306 16.9698ZM172.149 19.5898L169.589 12.5898H170.959L172.939 18.2798L174.929 12.5898H176.279L173.719 19.5898H172.149ZM176.273 19.5898L178.833 12.5898H180.273L182.833 19.5898H181.473L180.913 17.9698H178.183L177.613 19.5898H176.273ZM178.533 16.9698H180.563L179.543 14.0598L178.533 16.9698ZM186.625 19.7098C186.111 19.7098 185.658 19.6232 185.265 19.4498C184.871 19.2698 184.561 19.0165 184.335 18.6898C184.108 18.3565 183.991 17.9532 183.985 17.4798H185.335C185.348 17.8065 185.465 18.0832 185.685 18.3098C185.911 18.5298 186.221 18.6398 186.615 18.6398C186.955 18.6398 187.225 18.5598 187.425 18.3998C187.625 18.2332 187.725 18.0132 187.725 17.7398C187.725 17.4532 187.635 17.2298 187.455 17.0698C187.281 16.9098 187.048 16.7798 186.755 16.6798C186.461 16.5798 186.148 16.4732 185.815 16.3598C185.275 16.1732 184.861 15.9332 184.575 15.6398C184.295 15.3465 184.155 14.9565 184.155 14.4698C184.148 14.0565 184.245 13.7032 184.445 13.4098C184.651 13.1098 184.931 12.8798 185.285 12.7198C185.638 12.5532 186.045 12.4698 186.505 12.4698C186.971 12.4698 187.381 12.5532 187.735 12.7198C188.095 12.8865 188.375 13.1198 188.575 13.4198C188.781 13.7198 188.891 14.0765 188.905 14.4898H187.535C187.528 14.2432 187.431 14.0265 187.245 13.8398C187.065 13.6465 186.811 13.5498 186.485 13.5498C186.205 13.5432 185.968 13.6132 185.775 13.7598C185.588 13.8998 185.495 14.1065 185.495 14.3798C185.495 14.6132 185.568 14.7998 185.715 14.9398C185.861 15.0732 186.061 15.1865 186.315 15.2798C186.568 15.3732 186.858 15.4732 187.185 15.5798C187.531 15.6998 187.848 15.8398 188.135 15.9998C188.421 16.1598 188.651 16.3732 188.825 16.6398C188.998 16.8998 189.085 17.2365 189.085 17.6498C189.085 18.0165 188.991 18.3565 188.805 18.6698C188.618 18.9832 188.341 19.2365 187.975 19.4298C187.608 19.6165 187.158 19.7098 186.625 19.7098ZM193.871 19.7098C193.165 19.7098 192.558 19.5598 192.051 19.2598C191.545 18.9532 191.155 18.5298 190.881 17.9898C190.608 17.4432 190.471 16.8132 190.471 16.0998C190.471 15.3865 190.608 14.7565 190.881 14.2098C191.155 13.6632 191.545 13.2365 192.051 12.9298C192.558 12.6232 193.165 12.4698 193.871 12.4698C194.711 12.4698 195.398 12.6798 195.931 13.0998C196.471 13.5132 196.808 14.0965 196.941 14.8498H195.531C195.445 14.4698 195.258 14.1732 194.971 13.9598C194.691 13.7398 194.318 13.6298 193.851 13.6298C193.205 13.6298 192.698 13.8498 192.331 14.2898C191.965 14.7298 191.781 15.3332 191.781 16.0998C191.781 16.8665 191.965 17.4698 192.331 17.9098C192.698 18.3432 193.205 18.5598 193.851 18.5598C194.318 18.5598 194.691 18.4598 194.971 18.2598C195.258 18.0532 195.445 17.7698 195.531 17.4098H196.941C196.808 18.1298 196.471 18.6932 195.931 19.0998C195.398 19.5065 194.711 19.7098 193.871 19.7098ZM198.575 19.5898V12.5898H201.145C201.705 12.5898 202.165 12.6865 202.525 12.8798C202.891 13.0665 203.165 13.3232 203.345 13.6498C203.525 13.9698 203.615 14.3265 203.615 14.7198C203.615 15.1465 203.501 15.5365 203.275 15.8898C203.055 16.2432 202.708 16.4998 202.235 16.6598L203.685 19.5898H202.215L200.915 16.8298H199.855V19.5898H198.575ZM199.855 15.8898H201.065C201.491 15.8898 201.805 15.7865 202.005 15.5798C202.205 15.3732 202.305 15.0998 202.305 14.7598C202.305 14.4265 202.205 14.1598 202.005 13.9598C201.811 13.7598 201.495 13.6598 201.055 13.6598H199.855V15.8898ZM205.305 19.5898V12.5898H206.585V19.5898H205.305ZM208.442 19.5898V12.5898H211.032C211.592 12.5898 212.055 12.6832 212.422 12.8698C212.788 13.0565 213.062 13.3132 213.242 13.6398C213.422 13.9665 213.512 14.3332 213.512 14.7398C213.512 15.1265 213.425 15.4832 213.252 15.8098C213.078 16.1298 212.808 16.3898 212.442 16.5898C212.075 16.7832 211.605 16.8798 211.032 16.8798H209.722V19.5898H208.442ZM209.722 15.8398H210.952C211.398 15.8398 211.718 15.7432 211.912 15.5498C212.112 15.3498 212.212 15.0798 212.212 14.7398C212.212 14.3932 212.112 14.1232 211.912 13.9298C211.718 13.7298 211.398 13.6298 210.952 13.6298H209.722V15.8398ZM216.646 19.5898V13.6198H214.606V12.5898H219.976V13.6198H217.926V19.5898H216.646ZM157.977 29.5898V22.5898H160.787C161.514 22.5898 162.067 22.7598 162.447 23.0998C162.834 23.4332 163.027 23.8632 163.027 24.3898C163.027 24.8298 162.907 25.1832 162.667 25.4498C162.434 25.7098 162.147 25.8865 161.807 25.9798C162.207 26.0598 162.537 26.2598 162.797 26.5798C163.057 26.8932 163.187 27.2598 163.187 27.6798C163.187 28.2332 162.987 28.6898 162.587 29.0498C162.187 29.4098 161.62 29.5898 160.887 29.5898H157.977ZM159.257 25.5298H160.597C160.957 25.5298 161.234 25.4465 161.427 25.2798C161.62 25.1132 161.717 24.8765 161.717 24.5698C161.717 24.2765 161.62 24.0465 161.427 23.8798C161.24 23.7065 160.957 23.6198 160.577 23.6198H159.257V25.5298ZM159.257 28.5498H160.687C161.067 28.5498 161.36 28.4632 161.567 28.2898C161.78 28.1098 161.887 27.8598 161.887 27.5398C161.887 27.2132 161.777 26.9565 161.557 26.7698C161.337 26.5832 161.04 26.4898 160.667 26.4898H159.257V28.5498ZM164.785 29.5898V22.5898H167.355C167.915 22.5898 168.375 22.6865 168.735 22.8798C169.102 23.0665 169.375 23.3232 169.555 23.6498C169.735 23.9698 169.825 24.3265 169.825 24.7198C169.825 25.1465 169.712 25.5365 169.485 25.8898C169.265 26.2432 168.919 26.4998 168.445 26.6598L169.895 29.5898H168.425L167.125 26.8298H166.065V29.5898H164.785ZM166.065 25.8898H167.275C167.702 25.8898 168.015 25.7865 168.215 25.5798C168.415 25.3732 168.515 25.0998 168.515 24.7598C168.515 24.4265 168.415 24.1598 168.215 23.9598C168.022 23.7598 167.705 23.6598 167.265 23.6598H166.065V25.8898ZM171.516 29.5898V22.5898H172.796V29.5898H171.516ZM174.653 29.5898V22.5898H177.043C177.863 22.5898 178.536 22.7365 179.063 23.0298C179.596 23.3165 179.989 23.7232 180.243 24.2498C180.503 24.7698 180.633 25.3832 180.633 26.0898C180.633 26.7965 180.503 27.4132 180.243 27.9398C179.989 28.4598 179.596 28.8665 179.063 29.1598C178.536 29.4465 177.863 29.5898 177.043 29.5898H174.653ZM175.933 28.4898H176.983C177.569 28.4898 178.033 28.3965 178.373 28.2098C178.713 28.0165 178.956 27.7432 179.103 27.3898C179.249 27.0298 179.323 26.5965 179.323 26.0898C179.323 25.5898 179.249 25.1598 179.103 24.7998C178.956 24.4398 178.713 24.1632 178.373 23.9698C178.033 23.7765 177.569 23.6798 176.983 23.6798H175.933V28.4898ZM185.322 29.7098C184.662 29.7098 184.085 29.5598 183.592 29.2598C183.099 28.9598 182.715 28.5432 182.442 28.0098C182.169 27.4698 182.032 26.8432 182.032 26.1298C182.032 25.4098 182.172 24.7765 182.452 24.2298C182.739 23.6765 183.142 23.2465 183.662 22.9398C184.189 22.6265 184.812 22.4698 185.532 22.4698C186.352 22.4698 187.032 22.6665 187.572 23.0598C188.112 23.4532 188.462 23.9965 188.622 24.6898H187.192C187.085 24.3632 186.892 24.1098 186.612 23.9298C186.332 23.7432 185.972 23.6498 185.532 23.6498C184.832 23.6498 184.292 23.8732 183.912 24.3198C183.532 24.7598 183.342 25.3665 183.342 26.1398C183.342 26.9132 183.529 27.5132 183.902 27.9398C184.282 28.3598 184.795 28.5698 185.442 28.5698C186.075 28.5698 186.552 28.3998 186.872 28.0598C187.199 27.7132 187.395 27.2598 187.462 26.6998H185.692V25.7398H188.752V29.5898H187.572L187.472 28.6698C187.245 29.0032 186.962 29.2598 186.622 29.4398C186.282 29.6198 185.849 29.7098 185.322 29.7098ZM190.496 29.5898V22.5898H195.066V23.6198H191.776V25.5398H194.766V26.5398H191.776V28.5598H195.066V29.5898H190.496Z`,fill:`currentColor`})]})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(Warning,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This page is deprecated.`}),` It covers a legacy version of the plugin and is no longer maintained.`]}),_jsxs(_components.p,{children:[`For new implementations, or to upgrade to the latest Google Play Billing Library as Google recommends, use the `,_jsx(_components.a,{href:`/docs/google-iap`,children:`Google In-App Purchases`}),` guide.`]})]}),`\n`,_jsx(_components.p,{children:`Accept payments within your app using Google Play’s Billing Library to facilitate transactions such as one-time purchase, subscription, or promo code redemption.`}),`\n`,_jsx(_components.p,{children:`In-App Purchases (IAP) provide additional channels to monetize your app. Google Play allows for standard user-initiated in-app purchases and auto-renewing subscription purchases.`}),`\n`,_jsx(_components.p,{children:`Generally, if your app accepts payment for any digital goods or memberships, Google Play requires you to offer in-app purchases as an option for digital content, unless such content can also be consumed outside of the app. You are still free to implement other payment methods on your website separate from the mobile apps.`}),`\n`,_jsx(_components.p,{children:`Median’s Google Play In-App Purchase flow includes these steps:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create In-App Purchase items in the Google Play Console website`}),`\n`,_jsx(_components.li,{children:`Host a JSON file on your website with a list of purchasable items`}),`\n`,_jsx(_components.li,{children:`Display a web UI listing purchasable items`}),`\n`,_jsx(_components.li,{children:`Initiate a purchase when requested by a user`}),`\n`,_jsx(_components.li,{children:`Verify and fulfill purchase through Google Play`}),`\n`,_jsx(_components.li,{children:`Provide users with subscription management`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`configure-iap-in-google-play-console`,children:`Configure IAP in Google Play Console`}),`\n`,_jsx(_components.p,{children:`Create your app in the Google Play Console. The package name of your app is a globally unique identifier that identifies your app on Google Play. Your account “claims” that package name the first time you upload your app to the Google Play Console. Make sure that any pages with gray checkmarks are completed so that the checkmark turns green. The app must be fully configured in Google Play before you can create and test in-app purchases.`}),`\n`,_jsx(_components.p,{children:`In the Google Play Console, go to Store Presence -> In-App Products. Create either a Managed product (standard in-app purchase), or a Subscription. The product id will be used later in code to identify the item. Title and description are used in Google Play listings, and will also be passed to your app. If you wish to have different tiers of subscriptions (e.g. a monthly and annual subscription), they must be created as separate subscriptions.`}),`\n`,_jsx(Heading,{level:`2`,id:`host-a-json-file-with-available-products`,children:`Host a JSON file with available products`}),`\n`,_jsxs(_components.p,{children:[`Create a JSON file that lists the product IDs you would like to offer for sale. This allows you to in real time add or remove products without publishing a new version of your app. The following example shows three products for sale: a regular in-app purchase, and two subscription products. The product IDs for each must be placed in the correct section: `,_jsx(_components.code,{children:`inappProducts`}),` vs `,_jsx(_components.code,{children:`subProducts`}),`.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inappProducts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"remove_ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subProducts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscription_monthly\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscription_annual\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`You must then host the JSON file on your website to be accessible by your app. For example, the demo uses `,_jsx(_components.a,{href:`https://median.dev/iap/productsGoogle.json`,children:`https://median.dev/iap/productsGoogle.json`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`app-configuration`,children:`App configuration`}),`\n`,_jsxs(_components.p,{children:[`Now you are ready to enable and configure the plugin within the `,_jsx(_components.strong,{children:`Native Plugins`}),` tab of App Studio. You need to enter `,_jsx(_components.code,{children:`productsUrl`}),`. The `,_jsx(_components.code,{children:`productsUrl`}),` should point to the JSON file on your website. When your app launches, it will make an HTTP GET request to your `,_jsx(_components.code,{children:`productsUrl`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`purchased-products-and-iap-status`,children:`Purchased products and IAP status`}),`\n`,_jsxs(_components.p,{children:[`The app will verify the list of products with Google Play and retrieve each product’s information. Then it will execute a JavaScript function on your website defined as `,_jsx(_components.code,{children:`median_info_ready`}),` with a single object parameter. Alternatively you can use the Median JavaScript Bridge to obtain this data at runtime by calling the method `,_jsx(_components.code,{children:`median.iap.info()`}),`.`]}),`\n`,_jsx(_components.p,{children:`You define this function on your page, but don’t call it. If present on a page, it will be called by the app when the page is loaded.`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` median_info_ready`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`inAppPurchases`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`inAppPurchases`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`Or you may return the purchase data at runtime via a promise (in async function)`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`2`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` purchaseData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` median`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`purchaseData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`In both cases `,_jsx(_components.code,{children:`inAppPurchases`}),` will be of the form:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`26`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"inAppPurchases\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GooglePlay\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"remove_ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"inapp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$0.99\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price_amount_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`990000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price_currency_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Remove ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Enjoy an ad-free experience\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"member_basic_w\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$0.99\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price_amount_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`990000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price_currency_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subscriptionPeriod\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"P1W\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Weekly Membership\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Access member content (autorenews weekly)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`Each product will have the following fields:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`productID`}),`: the identifier set in Google Play that matches those in the `,_jsx(_components.code,{children:`productsUrl`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),`: “inapp” or “subs”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`price`}),`: the price you should display to your user. It will be localized to their currency.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`price_amount_micros`}),`: the price in micro-units, e.g. 1 USD = 1000000 micros.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`price_currency_code`}),`: the 3-letter currency code`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),`: from Google Play Console`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`description`}),`: from Google Play Console`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`display-web-ui-for-purchases`,children:`Display web UI for purchases`}),`\n`,_jsxs(_components.p,{children:[`Create a page on your website that shows the available items for purchase. It should wait for the `,_jsx(_components.code,{children:`median_info_ready`}),` function to be called and then populate the items for purchase. The price must be shown using the `,_jsx(_components.code,{children:`price`}),` string, as different users may have different language and currency settings.`]}),`\n`,_jsx(Heading,{level:`2`,id:`initiate-purchase`,children:`Initiate purchase`}),`\n`,_jsx(_components.p,{children:`When a user decides to purchase an IAP, run the JavaScript function:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`median`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`productID:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The Median app will then start the in-app purchase flow.`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`median.iap.purchase({'productID': 'product_id'});`}),` call supports these additional parameters for auto-renewing subscriptions:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`previousProductID`}),` – the product ID we are replacing. This is required to support subscription upgrades and downgrades (i.e. converting a monthly subscription to annual, or changing a subscription tier from basic to premium membership).`,`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`previousProductID`}),` is no longer accepted for purchase. Instead, use `,_jsx(_components.code,{children:`previousPurchaseToken`}),`. If this field is empty, the `,_jsx(_components.code,{children:`prorationMode`}),` is also ignored`]}),`\n`,_jsxs(_components.li,{children:[`The history/details of purchase now contain a list of Product IDs. Like how the library kept the `,_jsx(_components.code,{children:`productID`}),` field (which is the first item of the list), we also kept the `,_jsx(_components.code,{children:`productID`}),` in our response data for compatibility support. Hence, the web component shall get both `,_jsx(_components.code,{children:`productID`}),` and `,_jsx(_components.code,{children:`productID`}),`s for `,_jsx(_components.code,{children:`median_iap_purchases`})]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`prorationMode`}),` – determines how to credit the user for a mid-period subscription change. Valid values include:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IMMEDIATE_WITH_TIME_PRORATION`}),` – Replacement takes effect immediately, and the remaining time will be prorated and credited to the user. This is the current default behavior.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IMMEDIATE_AND_CHARGE_PRORATED_PRICE`}),` - Replacement takes effect immediately, and the billing cycle remains the same. The price for the remaining period will be charged. This option is only available for subscription upgrade.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IMMEDIATE_WITHOUT_PRORATION`}),` – Replacement takes effect immediately, and the new price will be charged on next recurrence time. The billing cycle stays the same.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DEFERRED`}),` - Replacement takes effect when the old plan expires, and the new price will be charged at the same time.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`5`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`median`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` productID:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"annual_membership\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` previousPurchaseToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aaaabbbbccccddddeeeeffff\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prorationMode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"IMMEDIATE_AND_CHARGE_PRORATED_PRICE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`purchase-verification-and-fulfillment`,children:`Purchase verification and fulfillment`}),`\n`,_jsxs(_components.p,{children:[`On app launch, and after any purchases are made, the app will call a JavaScript function on your page named `,_jsx(_components.code,{children:`median_iap_purchases`}),` with a single object parameter. Here is an example object:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GooglePlay\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"allPurchases\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GPA.3309-4129-7588-25875\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"packageName\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"io.median.android\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"productID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"member_basic_w\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purchaseTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1567462252415`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purchaseState\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purchaseToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fffpnbenegliokdcifadiihi.AO-J1OzGRezs5VkyKoyhYb-HgLEVG5XxswFLcLOyAnyy48sQPii2Yf6JYJe-Hm44FZT7ctkkkTlhRat15hoBWMnwXPzSgzlnCaYOvFRI_Yk5bzrBLXwOW-Mad1j9NsdoYkNywrOmJDzJ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"autoRenewing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"acknowledged\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purchaseTimeString\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2019-09-02T22:10:52.415Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"purchaseStateString\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"purchased\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`Each purchase item in the `,_jsx(_components.code,{children:`allPurchases`}),` array may have these fields:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`orderId`}),`: identifies the purchase transaction`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`packageName`}),`: should match the `,_jsx(_components.code,{children:`packageName`}),` of your app`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`productID`}),`: the identifier for what was purchased`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`purchaseTime`}),`: milliseconds since the unix epoch (Jan 1 1970)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`purchaseTimeString`}),`: formatted as a string`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`purchaseState`}),`: 0 – purchased, 1 – canceled, 2 – pending`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`purchaseString`}),`: “purchased”, “canceled”, “pending”, or “unknown”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`acknowledged`}),`: indicates the app has confirmed the purchase with Google Play`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`autoRenewing`}),`: indicates the purchase will autorenew. Note that this will be set to false if the user cancels their subscription.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`purchaseToken`}),`: a string that can be used to verify the purchase with Google.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`allPurchases`}),` array will list all current subscriptions. Any expired subscriptions will not longer appear.`]}),`\n`,_jsx(Heading,{level:`2`,id:`subscription-management`,children:`Subscription management`}),`\n`,_jsx(_components.p,{children:`You may wish to provide links for your users to manage their subscriptions.`}),`\n`,_jsx(_components.p,{children:`To open the Google Play page that lists all subscriptions for all of the user’s apps (not just your app), open the URL:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`median`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`manageAllSubscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`To allow the user to manage just your app’s subscription with the specified product ID, open the URL:`}),`\n`,_jsx(_MdxComponentBoundary,{name:`MedianLogo`,children:_jsx(MedianLogo,{})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`median`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`manageSubscription`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`productID:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`testing-process`,children:`Testing process`}),`\n`,_jsx(_components.p,{children:`Testing your in-app purchase flow requires your app be properly set up in Google Play to be distributed.`}),`\n`,_jsx(_components.p,{children:`Your test devices (including emulators) must have Google Play Store installed and be signed into a Gmail or Google Apps for Business account. You may use your day-to-day account. In your Developer Account -> Account details, go to the License Testing section. Add the email addresses for the test accounts.`}),`\n`,_jsxs(_components.p,{children:[`On your app’s management page, create an internal test track. Add the test user email to a user list. Once added, each test user go to the Opt-in URL (looks like `,_jsx(_components.code,{children:`https://play.google.com/apps/internaltest/1234321234...`}),`) and accept the Opt-In. Create a release build (or use the Median-built apk) and upload it to the internal test track. The test users should then be able to find the app in the Google Play Store on their devices and install it.`]}),`\n`,_jsx(_components.p,{children:`Subsequent releases to the internal test track will immediately be available to the test devices by checking for new updates in the Google Play Store app.`}),`\n`,_jsx(_components.p,{children:`Any in-app purchases can be tested without actual payment being exchanged. Auto-renewing subscriptions will renew every 5 minutes until they are canceled.`}),`\n`,_jsx(Heading,{level:`3`,id:`google-play-billing-references`,children:`Google Play Billing references`}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://developer.android.com/google/play/billing/billing_overview`,children:`Google Play’s billing system`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://medium.com/bleeding-edge/testing-in-app-purchases-on-android-a6de74f78878`,children:`Testing in-app purchases on Android`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{MedianLogo,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Google In-App Purchases (legacy)","description":"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.","deprecated":true,"keywords":["Google In-App Purchases","legacy","IAP","Google Play Billing","deprecated"],"searchable":true,"href":"/docs/google-iap-legacy"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[149,14145,"null;function _creat"]]},"mdxExtracts":{"tableOfContents":[{"title":"Configure IAP in Google Play Console","slug":"configure-iap-in-google-play-console","depth":2,"children":[]},{"title":"Host a JSON file with available products","slug":"host-a-json-file-with-available-products","depth":2,"children":[{"title":"App configuration","slug":"app-configuration","depth":3,"children":[]}]},{"title":"Purchased products and IAP status","slug":"purchased-products-and-iap-status","depth":2,"children":[]},{"title":"Display web UI for purchases","slug":"display-web-ui-for-purchases","depth":2,"children":[]},{"title":"Initiate purchase","slug":"initiate-purchase","depth":2,"children":[]},{"title":"Purchase verification and fulfillment","slug":"purchase-verification-and-fulfillment","depth":2,"children":[]},{"title":"Subscription management","slug":"subscription-management","depth":2,"children":[]},{"title":"Testing process","slug":"testing-process","depth":2,"children":[{"title":"Google Play Billing references","slug":"google-play-billing-references","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/median-co/7d11e00da3e50cd7/changelog-tags.js"],"dynamicCss":".mint-text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-text-white:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1))\n}","subdomain":"median-co","siteName":"Median Docs","title":"Google In-App Purchases (legacy) - Median Docs","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-07T14:23:14.332Z","gitLastModified":"2026-11-07T14:22:54.000Z","originalFileLocation":"docs/google-iap-legacy.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Median Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Google In-App Purchases (legacy) - Median Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Median Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.median.co/docs/google-iap-legacy\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://median-co.mintlify.site/_mintlify/api/og/v2?division=In-app+purchases\u0026amp;title=Google+In-App+Purchases+%28legacy%29\u0026amp;description=Reference+for+the+legacy+Google+In-App+Purchases+plugin.+For+new+implementations%2C+use+the+current+Google+In-App+Purchases+guide.\u0026amp;theme=89e8bfd49237022defc8e4a0\u0026amp;signature=7453cecf4b0f6c0b01ae7b92f30e556e4bec41538ebe8d7b95b5f39d8bfb88b9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Google In-App Purchases (legacy) - Median Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://median-co.mintlify.site/_mintlify/api/og/v2?division=In-app+purchases\u0026amp;title=Google+In-App+Purchases+%28legacy%29\u0026amp;description=Reference+for+the+legacy+Google+In-App+Purchases+plugin.+For+new+implementations%2C+use+the+current+Google+In-App+Purchases+guide.\u0026amp;theme=89e8bfd49237022defc8e4a0\u0026amp;signature=7453cecf4b0f6c0b01ae7b92f30e556e4bec41538ebe8d7b95b5f39d8bfb88b9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Median Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1174D3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.median.co/docs/google-iap-legacy\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/google-iap-legacy.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.median.co/#organization\",\"name\":\"Median Docs\",\"url\":\"https://docs.median.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-light.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=1da14bface36d3c440889b1a3b1df5f7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.median.co#website\",\"name\":\"Median Docs\",\"url\":\"https://docs.median.co\",\"publisher\":{\"@id\":\"https://docs.median.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.median.co/docs/google-iap-legacy#webpage\",\"url\":\"https://docs.median.co/docs/google-iap-legacy\",\"name\":\"Google In-App Purchases (legacy)\",\"description\":\"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\",\"dateModified\":\"2026-11-07T14:22:54.000Z\",\"isPartOf\":{\"@id\":\"https://docs.median.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.median.co/docs/google-iap-legacy#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.median.co/docs/google-iap-legacy#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Native Plugins\",\"item\":\"https://docs.median.co/docs/native-plugins-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Native functionality\",\"item\":\"https://docs.median.co/docs/native-functionality\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"In-app purchases\",\"item\":\"https://docs.median.co/docs/iap\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Google In-App Purchases (legacy)\",\"item\":\"https://docs.median.co/docs/google-iap-legacy\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.median.co/docs/google-iap-legacy#article\",\"headline\":\"Google In-App Purchases (legacy)\",\"name\":\"Google In-App Purchases (legacy)\",\"description\":\"Reference for the legacy Google In-App Purchases plugin. For new implementations, use the current Google In-App Purchases guide.\",\"url\":\"https://docs.median.co/docs/google-iap-legacy\",\"mainEntityOfPage\":{\"@id\":\"https://docs.median.co/docs/google-iap-legacy#webpage\"},\"dateModified\":\"2026-11-07T14:22:54.000Z\",\"keywords\":\"Google In-App Purchases, legacy, IAP, Google Play Billing, deprecated\",\"publisher\":{\"@id\":\"https://docs.median.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.median.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Median Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Median Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/google-iap-legacy.md","siteName":"Median Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Welcome","pages":[{"title":"Welcome to Median","href":"/docs/overview"},{"title":"App architecture","href":"/docs/architecture"},{"group":"Security \u0026 privacy","root":{"title":"Security \u0026 privacy","href":"/docs/security"},"pages":[{"title":"Reporting app abuse and content violations","href":"/docs/report"}]},{"title":"App licenses","href":"/docs/licenses"},{"title":"App updates and migration guide","href":"/docs/app-updates"},{"title":"App Studio accounts","href":"/docs/app-studio-accounts"},{"title":"Support","href":"/docs/support"},{"title":"Median MCP server","href":"/docs/mcp-server"}]},{"group":"Getting started","pages":[{"title":"Quickstart guide","href":"/docs/quickstart"},{"title":"App Studio Simulators","sidebarTitle":"Simulators","href":"/docs/simulators"},{"title":"App Store publishing","href":"/docs/app-publishing"}]},{"group":"Branding","pages":[{"title":"Branding overview","href":"/docs/branding-overview"},{"title":"App icon","href":"/docs/app-icon"},{"title":"Splash screen","href":"/docs/splash-screen"},{"title":"Theme colors","href":"/docs/theme-colors"},{"title":"Status bar","href":"/docs/status-bar"},{"title":"System navigation bar (Android)","href":"/docs/system-nav-bar"}]},{"group":"Interface","pages":[{"title":"App interface overview","href":"/docs/app-interface-overview"},{"group":"Device screen control","root":{"title":"Device screen control","href":"/docs/device-screen-control"},"pages":[{"title":"Screen brightness","href":"/docs/screen-brightness"},{"title":"Keep screen on","href":"/docs/keep-screen-on"},{"title":"Full screen","href":"/docs/full-screen"},{"title":"Screen orientation","href":"/docs/screen-orientation"}]},{"title":"Dark mode","href":"/docs/dark-mode"},{"title":"Native gestures and interactions","href":"/docs/swipe-gestures"},{"title":"Font scaling","href":"/docs/font-scaling"},{"title":"Webview zoom","href":"/docs/webview-zoom"},{"title":"New windows","href":"/docs/new-windows"},{"title":"Maximum windows","href":"/docs/maximum-windows"},{"group":"Offline page","root":{"title":"Offline page","href":"/docs/offline-page"},"pages":[{"title":"Service workers","href":"/docs/service-workers"},{"title":"Native datastore offline","href":"/docs/native-datastore-offline"}]},{"title":"iOS Split View support","href":"/docs/ios-split-view"},{"title":"Localization","href":"/docs/localization"},{"title":"Liquid Glass (iOS)","href":"/docs/ios-liquid-glass"}]},{"group":"Link handling","pages":[{"title":"Link handling overview","href":"/docs/link-handling-overview"},{"title":"Link behavior","href":"/docs/internal-vs-external-links"},{"group":"Deep linking","root":{"title":"Deep linking overview","href":"/docs/deep-linking"},"pages":[{"title":"Deep Linking Validator","href":"/docs/deep-linking-validator"},{"title":"Custom URL schemes","href":"/docs/url-scheme-protocol"}]}]},{"group":"Permissions","pages":[{"group":"Permissions overview","root":{"title":"Permissions overview","href":"/docs/permissions-overview"},"pages":[{"title":"Permission prompt localization","href":"/docs/permission-prompt-localization"}]},{"title":"Apple App Tracking Transparency","href":"/docs/apple-att"},{"title":"Camera and file uploads","href":"/docs/camera-and-file-uploads"},{"title":"Downloads directory","href":"/docs/downloads-directory"},{"title":"Location services","href":"/docs/location-services"},{"title":"WebRTC audio \u0026 video","href":"/docs/web-rtc"}]},{"group":"Web Overrides","pages":[{"title":"Website overrides overview","href":"/docs/website-overrides-overview"},{"title":"Custom user agent","href":"/docs/custom-user-agent"},{"title":"Custom headers","href":"/docs/custom-headers"},{"title":"Custom CSS","href":"/docs/custom-css"},{"title":"Custom JavaScript","href":"/docs/custom-js"},{"title":"Cookie persistence","href":"/docs/cookie-persistence"}]},{"group":"Native navigation","pages":[{"title":"Native navigation overview","href":"/docs/native-navigation-overview"},{"title":"Native navigation instances","href":"/docs/navigation-instances"},{"title":"Change navigation at runtime","sidebarTitle":"Runtime navigation","href":"/docs/navigation-runtime-api"},{"title":"What changed in native navigation","href":"/docs/native-navigation-changes"},{"title":"Native page transitions","href":"/docs/native-page-transitions"},{"group":"Top navigation bar","root":{"title":"Top navigation bar","href":"/docs/top-navigation-bar"},"pages":[{"title":"Dynamic titles","href":"/docs/dynamic-titles"},{"title":"Auto new windows","href":"/docs/auto-new-windows"},{"title":"Search form","href":"/docs/search-bar-form"},{"title":"Refresh button","href":"/docs/refresh-button"},{"title":"Share button","href":"/docs/share-button"},{"title":"Custom buttons","href":"/docs/add-custom-buttons"},{"title":"Top navigation bar demo app","href":"/docs/top-nav-bar-demo-app"}]},{"group":"Sidebar navigation","root":{"title":"Sidebar navigation","href":"/docs/sidebar-navigation-menu"},"pages":[{"title":"Sidebar Visual Editor","href":"/docs/sidebar-configuration"},{"title":"Dynamic menu items","href":"/docs/dynamic-menu-items"},{"title":"Sidebar demo app","href":"/docs/sidebar-demo-app"}]},{"group":"Bottom tab bar","root":{"title":"Bottom tab bar","href":"/docs/bottom-tab-bar"},"pages":[{"title":"Selecting tabs","href":"/docs/selecting-tabs"},{"title":"Bottom tab bar Visual Editor","href":"/docs/tab-configuration"},{"title":"Dynamic tab menu","href":"/docs/dynamic-tab-menu"},{"title":"Localized tab menu","href":"/docs/localized-tab-menu"},{"title":"Bottom tab demo app","href":"/docs/bottom-tab-demo-app"}]},{"title":"Custom icons","href":"/docs/custom-icons"},{"title":"iOS contextual navigation toolbar","href":"/docs/contextual-navigation-toolbar"}]},{"group":"Push notifications","pages":[{"group":"Push notifications overview","root":{"title":"Push notifications overview","href":"/docs/push-notifications-overview"},"pages":[{"title":"Push SDK migration guide","href":"/docs/push-notification-migration"}]},{"group":"OneSignal","root":{"title":"OneSignal overview","href":"/docs/onesignal"},"pages":[{"title":"Managing permissions and consent","href":"/docs/user-consent-management"},{"title":"Identifying and targeting users","href":"/docs/identifying-targeting-users"},{"group":"Sending push notifications","root":{"title":"Sending push notifications","href":"/docs/onesignal-notifications"},"pages":[{"title":"Programmatic notifications","href":"/docs/programmatic-notifications"},{"title":"Foreground notifications","href":"/docs/foreground-notifications"}]},{"title":"Customize push notifications","href":"/docs/notification-customization"},{"title":"Handling notification taps","href":"/docs/handling-notifications-taps"},{"title":"In-app messages","href":"/docs/in-app-messages"},{"title":"Legacy mode","deprecated":true,"href":"/docs/onesignal-legacy-mode"}]},{"title":"Braze","href":"/docs/braze"},{"title":"Bloomreach","href":"/docs/bloomreach"},{"title":"Cordial","href":"/docs/cordial"},{"group":"Firebase Cloud Messaging (FCM)","root":{"title":"Firebase Cloud Messaging","href":"/docs/firebase-cloud-messaging"},"pages":[{"title":"Firebase Cloud Messaging","href":"/docs/firebase-cloud-messaging"},{"title":"Targeting users with Firebase Cloud Messaging","href":"/docs/fcm-identifying-targeting-users"}]},{"title":"Intercom","href":"/docs/intercom"},{"title":"Iterable","href":"/docs/iterable"},{"title":"Klaviyo","href":"/docs/klaviyo"},{"title":"Customer.io","href":"/docs/customerio"},{"title":"Microsoft Dynamics","href":"/docs/ms-dynamics"},{"title":"MoEngage","href":"/docs/moengage"},{"title":"Optimizely","href":"/docs/optimizely"},{"title":"Salesforce Marketing Cloud","href":"/docs/salesforce-marketing-cloud"},{"title":"Sendbird","href":"/docs/sendbird"}]},{"group":"Median JavaScript Bridge","pages":[{"title":"JavaScript Bridge overview","href":"/docs/javascript-bridge"},{"title":"Detecting app usage","href":"/docs/detecting-app-usage"},{"group":"npm package","root":{"title":"NPM package overview","href":"/docs/npm-package"},"pages":[{"title":"Basic usage","href":"/docs/basic-usage"},{"title":"Using listeners","href":"/docs/npm-package-usage-with-listeners"},{"title":"SPA navigation","href":"/docs/npm-package-spa-navigation"}]},{"title":"Device info","href":"/docs/device-info"},{"title":"Clipboard","href":"/docs/clipboard"},{"title":"Prompt share dialog","href":"/docs/prompt-share-dialogue"},{"title":"App resumed callback","href":"/docs/app-resumed-callback"},{"title":"Keyboard state tracking","href":"/docs/keyboard-state-tracking"},{"title":"Download file","href":"/docs/download-file"},{"title":"Clear WebView cache","href":"/docs/clear-webview-cache"},{"title":"Accessing callbacks in an iframe","href":"/docs/iframe-callbacks"},{"group":"Google Tag Manager","root":{"title":"Control your Median app with Google Tag Manager","href":"/docs/google-tag-manager"},"pages":[{"title":"Install Median's GTM tag template","href":"/docs/install-median-gtm-template"}]}]},{"group":"Native Plugins","pages":[{"title":"Native plugins overview","href":"/docs/native-plugins-overview"},{"group":"Analytics","root":{"title":"Analytics","href":"/docs/analytics"},"pages":[{"title":"Adjust","href":"/docs/adjust"},{"title":"AppsFlyer","href":"/docs/appsflyer"},{"title":"Branch.io","href":"/docs/branch-io"},{"title":"Google Firebase Analytics","href":"/docs/firebase-analytics"},{"title":"Google Firebase Crashlytics","href":"/docs/crashlytics"},{"title":"Meta App Events","href":"/docs/facebook"},{"title":"Intent Edge","href":"/docs/intent-edge"}]},{"group":"Authentication","root":{"title":"Authentication","href":"/docs/authentication"},"pages":[{"title":"Auth0","href":"/docs/auth0"},{"title":"Clerk","href":"/docs/clerk"},{"group":"Biometric authentication","root":{"title":"Face ID, Touch ID, and Android biometrics","href":"/docs/auth"},"pages":[{"title":"Apple Face ID \u0026 Touch ID","href":"/docs/apple-face-id-touch-id"},{"title":"Android biometric","href":"/docs/android-biometric-auth"}]},{"title":"Passkey authentication (WebAuthn)","href":"/docs/passkey-authentication"},{"group":"Social login","root":{"title":"Social login overview","href":"/docs/social-login"},"pages":[{"title":"Facebook Login configuration","href":"/docs/facebook-login-configuration"},{"title":"Google Sign-In configuration","href":"/docs/google-sign-in-configuration"},{"title":"Sign in with Apple configuration","href":"/docs/sign-in-with-apple-configuration"},{"title":"Website configuration","href":"/docs/social-login-website-configuration"},{"title":"Server-side redirects","href":"/docs/social-login-server-side-redirects"},{"title":"JavaScript callbacks","href":"/docs/social-login-javascript-callbacks"}]}]},{"group":"Enterprise","root":{"title":"Enterprise overview","href":"/docs/enterprise"},"pages":[{"title":"Enterprise security","href":"/docs/enterprise-plugin"},{"title":"Jailbreak/root detection","href":"/docs/jailbreak-root-detection"},{"title":"Microsoft Intune","href":"/docs/microsoft-intune"}]},{"group":"Integrations","root":{"title":"Integrations","href":"/docs/integrations"},"pages":[{"title":"AdMob native ads","href":"/docs/admob-native-ads"},{"title":"Bubble plugin","href":"/docs/bubble-plugin"},{"title":"Card.io","href":"/docs/card-io"},{"title":"Master Lock","href":"/docs/master-lock"},{"title":"RevenueCat","href":"/docs/revenue-cat"},{"group":"Social share","root":{"title":"Social share overview","href":"/docs/social-share"},"pages":[{"title":"Instagram","href":"/docs/social-share-instagram"},{"title":"Snapchat","href":"/docs/social-share-snapchat"}]}]},{"group":"Media","root":{"title":"Media","href":"/docs/media"},"pages":[{"title":"Background audio","href":"/docs/background-audio"},{"title":"JW Player","href":"/docs/jwplayer"},{"title":"Kaltura media player","href":"/docs/kaltura-media-player"},{"title":"Native media player","href":"/docs/native-media-player"},{"title":"Twilio Video","href":"/docs/twilio"},{"title":"Web screenshot","href":"/docs/web-screenshot"},{"title":"Zoom","href":"/docs/zoom"}]},{"group":"Native functionality","root":{"title":"Native functionality","href":"/docs/native-functionality"},"pages":[{"title":"AgeSafety","href":"/docs/age-safety"},{"title":"App review","href":"/docs/app-review"},{"title":"Background location","href":"/docs/background-location"},{"title":"Calendar","href":"/docs/calendar"},{"title":"Haptics","href":"/docs/haptics"},{"title":"Health Bridge","href":"/docs/health-bridge"},{"group":"In-app purchases","root":{"title":"In-App Purchases","href":"/docs/iap"},"pages":[{"title":"Apple In-App Purchases","href":"/docs/apple-iap"},{"title":"Google In-App Purchases","description":"Sell in-app products and subscriptions in your Android app with Google Play Billing, from product setup to purchase verification and testing.","href":"/docs/google-iap"},{"title":"Google In-App Purchases (legacy)","deprecated":true,"href":"/docs/google-iap-legacy"}]},{"title":"Native contacts","description":"Check contact permissions, retrieve all device contacts, or show the native contact picker with the Native Contacts plugin and the JavaScript Bridge.","href":"/docs/native-contacts"},{"title":"Native datastore","href":"/docs/native-datastore"},{"title":"Offline download manager","href":"/docs/offline-download-manager"},{"title":"Reader modal","href":"/docs/reader-modal"},{"title":"Secure modal","href":"/docs/secure-modal"},{"title":"Share into app","href":"/docs/share-into-app"}]},{"group":"Scanning","root":{"title":"Scanning","href":"/docs/scanning"},"pages":[{"title":"Document scanner","href":"/docs/document-scanner"},{"title":"iBeacon","href":"/docs/ibeacon"},{"title":"NFC tag scanner","href":"/docs/nfc-tag-scanner"},{"title":"QR / barcode scanner","href":"/docs/qr-barcode-scanner"},{"title":"Scandit QR / barcode","href":"/docs/scandit-qr-barcode"}]}]},{"group":"Website builders","pages":[{"title":"Website builder overview","href":"/docs/ai-app-builder-overview"},{"group":"Base44","root":{"title":"Base44","href":"/docs/base44"},"pages":[{"title":"Getting started with Base44","href":"/docs/getting-started-with-base44"},{"title":"Add push notifications to a Base44 app","href":"/docs/add-push-notifications-to-a-base44-app"},{"title":"Adding haptic feedback to your Base44 app","href":"/docs/adding-haptic-feedback-to-your-base44-app"}]},{"group":"Lovable","root":{"title":"Lovable","href":"/docs/lovable"},"pages":[{"title":"Tutorial: Build a fitness tracker app with Lovable and Median","href":"/docs/getting-started-with-lovable"},{"title":"Add push notifications to your Lovable app","href":"/docs/add-push-notifications-to-your-lovable-app"},{"title":"Add haptic feedback to your Lovable app","href":"/docs/add-haptic-feedback-to-your-lovable-app"},{"title":"Prepare your Lovable app for publishing","href":"/docs/prepare-your-lovable-app-for-publishing"}]},{"group":"Replit","root":{"title":"Replit","href":"/docs/replit"},"pages":[{"title":"Getting started with Replit","href":"/docs/getting-started-with-replit"},{"title":"Add push notifications to your Replit app","href":"/docs/add-push-notifications-to-a-replit-app"},{"title":"Add haptic feedback to your Replit app","href":"/docs/add-haptic-feedback-to-your-replit-app"}]},{"group":"Salesforce Experience Cloud","root":{"title":"Salesforce overview","href":"/docs/salesforce"},"pages":[{"title":"Getting started with Salesforce Experience Cloud","href":"/docs/getting-started-with-salesforce-experience-cloud"},{"title":"Lightning Web Components and the Median JavaScript Bridge","href":"/docs/salesforce-lwc-median"},{"title":"Deep linking for Salesforce Experience Cloud","href":"/docs/salesforce-deep-linking"},{"title":"Salesforce LWC component deployment and reference","href":"/docs/salesforce-lwc-components"}]},{"group":"Shopify","root":{"title":"Shopify","href":"/docs/shopify"},"pages":[{"title":"Using Social Login in your Shopify store's mobile app","href":"/docs/using-social-login-in-the-mobile-app-of-your-shopify-store"}]},{"title":"App monetization","href":"/docs/app-monetization"},{"title":"App marketing and growth","href":"/docs/app-marketing-growth"}]},{"group":"Build \u0026 test","pages":[{"title":"Build and test overview","href":"/docs/development-test-deep-dive"},{"title":"Median App Studio","href":"/docs/app-studio"},{"group":"Debug tools","root":{"title":"Debug tools","href":"/docs/debug-tools"},"pages":[{"title":"iOS debugging","href":"/docs/ios-debugging"},{"title":"Android debugging","href":"/docs/android-debugging"}]},{"group":"iOS build \u0026 deployment","root":{"title":"iOS build \u0026 deployment","href":"/docs/ios-build-deployment"},"pages":[{"group":"Building an iOS binary (IPA)","root":{"title":"Building an iOS binary (IPA)","href":"/docs/build-ios-binary"},"pages":[{"title":"Connecting Median with App Store Connect","href":"/docs/connecting-median-appstore-connect"},{"title":"Register testing devices","href":"/docs/registering-testing-devices"},{"title":"Configure signing for your app","href":"/docs/configure-signing-for-your-app"},{"title":"Building an iOS binary with App Groups entitlement","href":"/docs/building-an-ios-binary-for-apps-using-app-groups-entitlements"},{"title":"Install iOS IPA","href":"/docs/install-ios-ipa"}]},{"title":"Build iOS from source","href":"/docs/build-ios-from-source"},{"title":"Common Xcode issues","href":"/docs/common-xcode-issues"},{"title":"Upload an iOS app to TestFlight","href":"/docs/upload-ios-to-testflight"},{"title":"Upload iOS to Apple App Store","href":"/docs/upload-ios-to-apple-app-store"}]},{"group":"Android build \u0026 deployment","root":{"title":"Android build and deployment","href":"/docs/android-build-deployment"},"pages":[{"title":"Install Android APK","href":"/docs/install-android-apk"},{"title":"Build Android from source","href":"/docs/build-android-from-source"},{"title":"Connect Android Studio emulators to localhost websites","href":"/docs/android-studio-with-localhost-website"},{"title":"Android App Bundle (AAB)","href":"/docs/android-app-bundle"},{"title":"Upload Android to Google Play","href":"/docs/upload-android-to-google-play"}]},{"group":"App configuration \u0026 management","root":{"title":"App configuration and management","href":"/docs/app-configuration-management"},"pages":[{"title":"App identifiers","href":"/docs/app-identifiers"},{"title":"App configuration","href":"/docs/app-configuration-appconfigjson"},{"title":"Google Services","href":"/docs/google-services"},{"title":"Google developer verification","href":"/docs/google-developer-verification"},{"title":"Backup management","href":"/docs/backup-management"},{"title":"Multiple app instances","href":"/docs/multiple-app-instances"},{"title":"CI/CD integration","href":"/docs/cicd-integration"}]}]},{"group":"Publishing","pages":[{"title":"Publishing overview","href":"/docs/publishing-overview"},{"title":"Publishing guide","href":"/docs/publishing-guide"},{"title":"Publishing Service process","href":"/docs/publishing-service"},{"title":"Apple App Store","href":"/docs/apple-app-store"},{"title":"Google Play Store","href":"/docs/google-play-store"},{"title":"Screenshot specifications","href":"/docs/app-store-screenshots"},{"title":"Publishing FAQ","href":"/docs/faq-publishing"}]}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"basePath":"","title":"Google In-App Purchases (legacy) - Median Docs","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}