Connect Play Store with Chargebee 

This document guides you through the process of connecting your Google Play Store app with Chargebee. To connect Google Play Store with Chargebee, you must provide permissions to Chargebee through a service account. This permission allows Chargebee to connect to Google on behalf of your app and manage your subscriptions too. Establishing this connection offer you the following benefits:

  • Validate in-app purchase token with Google server.
  • Sync all In-App Purchase (IAP) subscriptions to Chargebee.
  • Single source of truth for subscriptions across web and App.
  • Derive insights by linking play Store transactions to existing customer data.
  • Leverage on Chargebee's expertise to manage IAP subscriptions.

Retrieving App information from Google Play Store 

Chargebee requires the following information to connect to Google on behalf of your app:

  • App Name
  • Package Name
  • Service Account Credentials JSON

App Name and Package Name 

Follow the steps below to retrieve your app name and app package name:

  1. Login to your Google Play Store Console .
  2. Click Dashboard from the main menu.
  3. Review the list of apps and click application to be connected.
  4. Make a note of the App name to be connected to Chargebee or use an App name with which you want to identify your App in Chargebee.
  5. The App Package Name is the URL displayed below the app name.
    Alternatively, click View on Google Play to view the App package name. The app's package name is in the URL of the Google Play Store page.
    For example, if the Play store URL is https://play.google.com/store/apps/details?id=com.android.chrome, then the app package name is com.android.chrome

Generate Service Account credentials JSON 

Follow the steps below to generate service account credentials JSON:

  1. Navigate to the home page of Google Play Console.

  2. Click API Access from the Setup menu.

  3. Click Choose a project to link to associate with your Chargebee app.

  4. Review the Terms of Service notification and click I Agree.

Create a Service Account 

  1. Click Create new service account from the Service accounts section.

  2. Click Google Cloud Platform from the Create new service account pop-up window.

Note: You are directed to a new window. Do not close the current window since it will be used for configuration later.

  1. Select the applicable project from the list.

  2. Click Create Service Account from the header menu.

  3. Enter the desired name in the Service account name field and click CREATE AND CONTINUE.

  4. Select Pub/Sub Admin from the Select a role drop-down list in the Grant this service account access section. This allows Chargebee to receive notifications from Google on your App's behalf.

  5. Click ADD ANOTHER ROLE.

  6. Select Monitoring Viewer from the Select a role drop-down list in the Grant this service account access section.

  7. Click Continue to proceed.

  8. Click Done to complete the creation of a service request.

  9. Select the applicable service account and click Manage keys from menu.

  10. Click Create a new key from the ADD Key drop-down list.

  11. Select the JSON radio button and click CREATE.

  12. The JSON private key is saved to the your local computer.
    Note: This key cannot be recovered if lost and must be stored safely.

  13. Return to your Google Play Console and click Done.

Access Permissions 

  1. Click Grant Access for the applicable service account in the Google Play Console.

  2. Select the following checkboxes to enable Chargebee to receive subscription-related notifications from Google.

    • View app information and download bulk reports
    • View Financial data, orders, and cancellation survey responses
    • Manage orders and subscriptions
  3. Click Invite User to review the pop-up notification and click Send Invite.

  4. Click the applicable service account from the list.

  5. Select the applicable app from the Add app drop-down list and click Apply.

  6. Click Apply to complete linking the service account.

Follow the steps below to configure your Play Store app with Chargebee:

  1. Login to your Chargebee site and click Apps from the menu.

  2. Click Go to Marketplace.

  3. Click Mobile App Store.

  4. Click Google Play Store.

  5. Click Proceed to initiate the connection of your Play Store app with Chargebee.

  6. Type the name of the app and package name retrieved from the Play Store Console in the App Name and Package Name field.

  7. Click Browse or use the drag-and-drop function to upload the JSON file saved on your system during the creation of the service account.
    Note: All three fields are mandatory to connect your Play Store app with Chargebee.

  8. Click Connect to complete the integration process.

Was this article helpful?
Loading…