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.

Prerequisites Configuration 

As part of the integration you must configure the following prerequisites within your Chargebee site.

Currencies 

You must configure all of the currencies associated with your Playstore app.
Click Configure to set up your currencies. Read more here.

Billing Mode 

You must model the accountable duration for your billing to include milli-second based billing and enable proration for your app in Chargebee.
Click Configure to set up your Billing mode. Read more here.

Billing Frequency 

You must configure the billing frequency options associated with your app within Chargebee.
Click Configure to setup Billing Frequency. Read more here.

Note

Click Proceed after all of the prerequisites are configured.

Google Play Store is successfully connected to your Chargebee site and is ready to setup notifications.

Frequently Asked Questions (FAQ) 

1. Can I connect multiple apps with my Chargebee site?

No, you cannot connect multiple apps from Google Playstore with Chargebee. However, we are continuously reviewing our offerings and should be able to offer this functionality soon. Meanwhile we would appreciate if you share your use case with us. Please write to us at [email protected]  if you need to connect multiple apps to a single Chargebee site.

2.I have issues with my Service Account Credentials, what can I do?

You can always review the documentation from Google here  for additional information.

3. Can I change the name of my app on the Chargebee site once the setup is complete?

No, you cannot change the display name that you choose for your app on the Chargebee site. However, you may choose to delink your connection but while existing imported data is available no new updates or data will be synced.

4. Can I manage changes to customer subscriptions from Playstore within Chargebee after integration?

No, the subscriptions are added to Chargebee in "Read Only" mode hence disabling the action to complete any actions for subscriptions. Any changes to a subscription must be completed within Google Playstore. This will ensure that any changes to the subscription will be handled in line with the guidelines established by Google.

The read-only feature also applies to all subscription associated items including invoices, credit notes, charges etc.

Was this article helpful?
Loading…