Integration requirements
Stay organized with collections
Save and categorize content based on your preferences.
In order to implement Subscribe with Google, You generally must complete the implementation tasks
below, but Your individual circumstances (i.e. website or back-end configuration) may obviate the
need to implement certain tasks. In these Implementation Requirements, the term “Publisher”
has the same meaning as “You” in the Subscribe with Google Addendum to the Google Play Developer
Distribution Agreement.
-
Google Play developer account:
Publisher must create a Google Play developer account, upload an application, and enable the
application for billing. Publisher must publish the application in production, or use an
existing production application.
-
Publication Configuration: Publisher must work with Google technical solutions
representatives to set up certain points of configuration that Google requires to set up the
integration including: URLs for required API endpoints, logo/branding assets, SKU details,
privacy policy and Terms of Service URLs. This configuration must be done per integrated
publication.
-
Page markup: Publisher must add structured data which is comprised of a publication id
(corresponding to the id in the Publication Configuration) and an entitlement label. The
structured data must be on all article pages, including desktop and mobile documents.
-
swg.js client integration: Publisher must integrate the Google javascript client into
their publication website. Publisher must include swg.js client library on all pages where a
paywall may be triggered, including articles that are part of a server-side paywall
implementation, and must call the swg.js getEntitlements function and handle the response from
that function appropriately.
To the extent Publisher creates mobile versions of its pages and these mobile pages
potentially trigger paywalls, the mobile pages must be configured with a mobile paywall that
uses SwG entitlements, so that SwG user entitlements are respected.
-
Android integration: To the extent Publisher is selling divergent sets of SKU on
Android versus web, or in the case that Publisher has multiple apps for the same publication,
Publisher must update its Android applications to check for the subscription purchase and also
call the Subscribe with Google Publication API and grant access appropriately.
-
Sign in with Google: Publisher must include a Sign in with Google option on all login
pages for web and implement the relevant GIS libraries for iOS and Android Applications.
This Sign in with Google implementation must check the Subscribe with Google Publication API
to ensure that if the Google Account has a linked entitlement with the publisher already, the
Google Account is associated with the user's existing account on the Publisher's site. If the
Subscribe with Google Publication API indicates that the user has an entitlement the Publisher
is unaware of, the Publisher will appropriately grant access for known users, however if the
user is unknown, Publisher will launch a Deferred Account Creation Flow.
If Publisher's web or mobile application product provides an entirely free experience and
does not gate access with a paywall, Sign in with Google is not required. Additionally, in the
rare case where a publisher does not maintain a user management system (i.e., the publisher
relies completely on Subscribe with Google for managing user transactions), no Sign in with
Google integration is necessary (or possible).
-
Post Purchase Account Creation Handler: Publisher must create accounts for users
following a purchase.
On the web, Publisher must be able to pass back swg.js subscription events and entitlement
data to the Publisher infrastructure. For purchases made on Google surfaces or in-app,
Publisher must handle deferred account creation and Publisher will receive account creation
notifications via Pub/Sub or the Publication API.
Publisher must subscribe to Play Cloud or Reader Revenue Pub/Sub events within the Publisher
infrastructure.
Publisher must use purchase data from subscription events to request user profile and
subscription data from Google's Subscription Status API. After getting that data, the Account
Management API must either:
- create an account with the user profile information provided by Google and associate the
subscription with that account; or
- append the Google user profile and subscription data to an existing user account on the
Publisher's site.
In the circumstance where a publisher does not maintain a user management system (i.e. the
publisher relies completely on Subscribe with Google for managing user transactions), no
post-purchase account creation is necessary (or possible).
-
iOS Integration: If Publisher has paywalled content associated with a Subscribe with
Google SKU in an iOS app, following the use of Google Sign-in, Publisher must check their
backend for entitlements, and if none are found, call the Subscribe with Google Publication
API to check for entitlements and grant access if any are found.
-
Subscription Linking: At the end of any purchase flows not processed with
Subscribe with Google, Publisher must integrate Subscription Linking functionality to provide
users the option to link their Google account. Publishers will need to create a Google Cloud
project to implement subscription linking.
-
Requirements for Publishers based in Germany: Publishers based in Germany must
implement the following:
- Surface a clearly and legibly labeled cancellation button that is always present on your
website for German subscribers with the text “Cancel contracts here" [“Verträge hier
kündigen”] or an equivalent, unambiguous wording.
- Direct German users who have subscribed to your publication through Subscribe with Google
and click on your cancellation button to
https://support.google.com/googleplay/contact/cancel_sub_request to request
cancellation of their subscriptions.
- Respond to subscribers who incorrectly attempt to cancel a subscription purchased through
Subscribe with Google directly with you with a clear and unambiguous statement informing the
subscriber that they should visit
https://support.google.com/googleplay/contact/cancel_sub_request to request to cancel
a contract that was purchased through Subscribe with Google.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003ePublishers must create a Google Play developer account and configure their publication with Google to integrate Subscribe with Google.\u003c/p\u003e\n"],["\u003cp\u003eWebsites need structured data markup and the SwG.js client to enable paywalled content and user entitlements.\u003c/p\u003e\n"],["\u003cp\u003eAccount creation and management must be handled for purchases made through Subscribe with Google, ensuring user access across platforms.\u003c/p\u003e\n"],["\u003cp\u003eSign in with Google is required for login and account linking unless the publication is entirely free or doesn't manage user accounts.\u003c/p\u003e\n"],["\u003cp\u003eGerman publishers must provide a clear cancellation button directing users to Google Play Support for subscription cancellations.\u003c/p\u003e\n"]]],[],null,["# Integration requirements\n\nIn order to implement Subscribe with Google, You generally must complete the implementation tasks\nbelow, but Your individual circumstances (i.e. website or back-end configuration) may obviate the\nneed to implement certain tasks. In these Implementation Requirements, the term \"**Publisher**\"\nhas the same meaning as \"You\" in the Subscribe with Google Addendum to the Google Play Developer\nDistribution Agreement.\n\n1. **Google Play developer account:**\n\n Publisher must create a Google Play developer account, upload an application, and enable the\n application for billing. Publisher must publish the application in production, or use an\n existing production application.\n2. **Publication Configuration:** Publisher must work with Google technical solutions\n representatives to set up certain points of configuration that Google requires to set up the\n integration including: URLs for required API endpoints, logo/branding assets, SKU details,\n privacy policy and Terms of Service URLs. This configuration must be done per integrated\n publication.\n\n3. **Page markup:** Publisher must add structured data which is comprised of a publication id\n (corresponding to the id in the Publication Configuration) and an entitlement label. The\n structured data must be on all article pages, including desktop and mobile documents.\n\n4. **swg.js client integration:** Publisher must integrate the Google javascript client into\n their publication website. Publisher must include swg.js client library on all pages where a\n paywall may be triggered, including articles that are part of a server-side paywall\n implementation, and must call the swg.js getEntitlements function and handle the response from\n that function appropriately.\n\n To the extent Publisher creates mobile versions of its pages and these mobile pages\n potentially trigger paywalls, the mobile pages must be configured with a mobile paywall that\n uses SwG entitlements, so that SwG user entitlements are respected.\n5. **Android integration:** To the extent Publisher is selling divergent sets of SKU on\n Android versus web, or in the case that Publisher has multiple apps for the same publication,\n Publisher must update its Android applications to check for the subscription purchase and also\n call the Subscribe with Google Publication API and grant access appropriately.\n\n6. **Sign in with Google:** Publisher must include a Sign in with Google option on all login\n pages for web and implement the relevant GIS libraries for iOS and Android Applications.\n\n This Sign in with Google implementation must check the Subscribe with Google Publication API\n to ensure that if the Google Account has a linked entitlement with the publisher already, the\n Google Account is associated with the user's existing account on the Publisher's site. If the\n Subscribe with Google Publication API indicates that the user has an entitlement the Publisher\n is unaware of, the Publisher will appropriately grant access for known users, however if the\n user is unknown, Publisher will launch a Deferred Account Creation Flow.\n\n If Publisher's web or mobile application product provides an entirely free experience and\n does not gate access with a paywall, Sign in with Google is not required. Additionally, in the\n rare case where a publisher does not maintain a user management system (i.e., the publisher\n relies completely on Subscribe with Google for managing user transactions), no Sign in with\n Google integration is necessary (or possible).\n7. **Post Purchase Account Creation Handler:** Publisher must create accounts for users\n following a purchase.\n\n On the web, Publisher must be able to pass back swg.js subscription events and entitlement\n data to the Publisher infrastructure. For purchases made on Google surfaces or in-app,\n Publisher must handle deferred account creation and Publisher will receive account creation\n notifications via Pub/Sub or the Publication API.\n\n Publisher must subscribe to Play Cloud or Reader Revenue Pub/Sub events within the Publisher\n infrastructure.\n\n Publisher must use purchase data from subscription events to request user profile and\n subscription data from Google's Subscription Status API. After getting that data, the Account\n Management API must either:\n 1. create an account with the user profile information provided by Google and associate the subscription with that account; or\n 2. append the Google user profile and subscription data to an existing user account on the Publisher's site.\n\n In the circumstance where a publisher does not maintain a user management system (i.e. the\n publisher relies completely on Subscribe with Google for managing user transactions), no\n post-purchase account creation is necessary (or possible).\n8. **iOS Integration:** If Publisher has paywalled content associated with a Subscribe with\n Google SKU in an iOS app, following the use of Google Sign-in, Publisher must check their\n backend for entitlements, and if none are found, call the Subscribe with Google Publication\n API to check for entitlements and grant access if any are found.\n\n9. **Subscription Linking:** At the end of any purchase flows *not* processed with\n Subscribe with Google, Publisher must integrate Subscription Linking functionality to provide\n users the option to link their Google account. Publishers will need to create a Google Cloud\n project to implement subscription linking.\n\n10. **Requirements for Publishers based in Germany:** Publishers based in Germany must\n implement the following:\n\n 1. Surface a clearly and legibly labeled cancellation button that is always present on your website for German subscribers with the text \"Cancel contracts here\" \\[\"*Verträge hier\n kündigen*\"\\] or an equivalent, unambiguous wording.\n 2. Direct German users who have subscribed to your publication through Subscribe with Google and click on your cancellation button to \u003chttps://support.google.com/googleplay/contact/cancel_sub_request\u003e to request cancellation of their subscriptions.\n 3. Respond to subscribers who incorrectly attempt to cancel a subscription purchased through Subscribe with Google directly with you with a clear and unambiguous statement informing the subscriber that they should visit \u003chttps://support.google.com/googleplay/contact/cancel_sub_request\u003e to request to cancel a contract that was purchased through Subscribe with Google."]]