Docschargebeedocs

HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Developer Resources
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model context protocol)

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Invoices, Credit Notes and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Managing payments with ChargebeeJS
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Order Management
  • Mobile Subscriptions (Legacy)
    • Legacy Vs New Solution
    • What do you need to know
    • What are the Limitations
    • Apple App Store
    • Google Play Store
      • Connect Play Store with Chargebee
      • Google Play Store Notifications
      • Google Play Store Product Import
      • One Time Purchase
      • Unlink Play Store Integration
      • Google Play Store Sandbox Configuration
      • Chargebee’s Solution for Implementing Billing Library 5.0
    • Multiple Apps Connection
    • Frequently Asked Questions
  • Other Integrations
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Integrations
  3. Mobile Subscriptions (Legacy)
  4. Google Play Store
  5. Connect Play Store with Chargebee
  1. Billing
  2. Integrations
  3. Mobile Subscriptions (Legacy)
  4. Google Play Store
  5. Connect Play Store with Chargebee

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

To retrieve your App Name and App Package Name, follow these steps:

  1. Login to your Google Play Store Console.

  2. Click Home from the main menu.

    image
  3. Review the list of apps present in your Google Play Console.

    image
  4. Click the specific App from the list and navigate to Dashboard to check the App Name and App Package Name.

    1. App Name
    2. App Package Name
      image
  5. Take a note of the App Name and App Package Name that you want to connect with your Chargebee account.

Generate Service Account Credentials JSON File

To enable Chargebee servers to communicate with Google on behalf of your app, you need to provide service credentials by generating a service account credentials JSON file. Follow the steps carefully to generate this file.

Google Play Service Credentials might require up to 36 hours to become fully operational with the Google Play Android Developer API.

Step 1: Enable Google Developer and Reporting APIs

These APIs have to be enabled to manage your app in the Google Play Store and consume the data from Google Play Console for reporting.

To enable Google Play Android Developer API and Google Play Developer Reporting API, follow these steps:

  1. Login to your Google Cloud Console.

  2. Select a project from the dropdown list.

    image
  3. Optional: Click NEW PROJECT to create a new project if you do not have an existing project.

    image
    1. Enter the Project name, Organization, and Location to create a new project and click CREATE.
      image
  4. Navigate to APIs & Services > Enable APIs & services. Click + ENABLE APIS AND SERVICES.

    image
  5. Search Google Play Android Developer API and Google Play Developer Reporting API.

    image
  6. Enable both APIs.

    image
    image
  7. Post enabling these APIs, you'll be redirected to the Google Cloud API page. If you already have credentials to access this API then proceed to Step 2. If you don't have credentials to access these APIs, then follow below two steps

    1. Click Create Credentials.
      image
    2. In the Credential Type screen, the API will be auto-selected for which you are going to create credentials. What data will you be accessing? option,select the Application data as Chargebee only needs the application data, and click Next.
      image
    3. In the Service account details screen, enter the Service account name, Service account ID, and Service account description. To create a service account follow Step 2 and click CREATE AND CONTINUE > DONE.
      image
    4. If you have just created credentials, a message will appear - To use this API, you may need credentials. This message appears because Google takes some time to validate credentials.

Step 2: Create a service account and download the service account credentials JSON file

You need to create a service account for Chargebee to make authorized API calls for your app.

To create a service account, follow these steps

  1. Navigate to IAM & Admin > Service Account in the Google Cloud Console. Ensure that the project for which the service account needs to be created is selected. Ideally, it is the same as the one selected in the previous step.

    image
  2. Click Create Service Account.

  3. In the Service account details step, enter the Service account name, Service account ID, and Service account description, and click Create And Continue.

    image
  4. In the Grant this service account access to project step, select the Role as Pub/Sub Admin and Monitoring Viewer, and click Continue. These roles enable receiving Google platform server notifications and monitoring the notification queue. You can skip the third step Grant users access to this service account and click DONE.

    image
  5. In the Service accounts for screen, identify the recently created service account and click the ⋮ icon > Manage keys.

    image
  6. In the Keys tab, click Add Key and create a new key.

    image
  7. In the Key type, select JSON to create a private key for your associated service account and click CREATE to download the key.

    image
  8. Save the downloaded key and click CLOSE. Note: This service account credentials JSON file needs to be uploaded to Chargebee while integrating your Android App. So please make sure that it is saved securely.

    image

Step 3: Invite service account and grant access permissions

In order to manage the subscriptions with the notifications received from the Google Store and retrieve the financial data with the service account, you need to invite the service account as a user and grant the needed permissions in the Google Play Console.

To invite the service account as a user and grant the needed permissions, follow these steps:

  1. Open Google Play Console and login using your Google developer account credentials.

  2. Navigate to Users and permissions and click Invite new users to invite the service account created in Step 2.

    image
    1. Go to the Service accounts section in the Google Cloud Console and copy the service account that was created in Step 2.
      image
  3. In the Invite user screen, paste this service account in the Email address field.

    image
    1. Go to Permissions > Account permissions, add the following permissions to the service account, and click Invite user.
      1. View app information and download bulk reports: To view apps and download the reports
        image
      2. View financial data, orders, and cancellation survey responses: To view financial data related to purchases
      3. Manage orders and subscriptions: To view and refund orders
        image
  4. In the Users and permissions screen verify the invitation. You can see the newly created account as Active.

    image

Link Play Store with Chargebee

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

  1. Login to your Chargebee site and click Apps in the left nav.

  2. Click Go to Marketplace.

  3. Click Mobile App Store.

    image
  4. Click Google Play Store card and click Connect on the Google Play Store page in marketplace.

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

    image
  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 in Step 2. Note: All three fields are mandatory to connect your Play Store app with Chargebee.

    image
  8. Click Connect to complete the integration process.

API References

  • In app subscriptions
  • Non subscriptions
  • Processing Webhooks

Was this article helpful?