Conscent.ai Developer Documentation
  • Version 2.0
    • Using Conscent.ai
    • Web SDK
    • Login
    • Logout
    • User Details Drawer
    • Google One Tap
    • Mobile SDK
      • iOS(Swift)
        • In-App Purchases with Conscent
      • Android SDK
      • React Native SDK
      • Google In-App Purchases with Conscent
      • Apple In-App Purchases with Conscent
    • Facebook SSO Integration Guide
    • Landing Page API v 2.0
    • AMP Integration
    • Integrating APIs(v2)
      • Purchase Details
      • User Registered Or Not
      • User Registrations
      • Subscription Plans Details
      • Get User Details
      • Add Subscription If User Registered
      • Update UserDetails
      • Update SubscriptionDetails
      • Get All Transaction Details
    • IAM System API Documentation
  • Version 1.0
    • Getting Started
    • On Board
    • Using Conscent.ai
    • Authentication
    • Web SDK
    • Login
    • Logout
    • Amp Documentation
    • Mobile SDK
      • Android
      • Flutter
      • iOS(Swift)
      • React Native SDK
    • Auto Login
    • Creating External Purchases
    • Landing Page API
  • Login Screen Customization
  • Integrating Client Payment Gateway
  • Integrating with APIs
    • User Details and Subscriptions Information
    • Purchased Subscriptions
    • User and Purchase Details
    • Client Purchases
    • Client Micropayments
    • Client Passes
    • Cancel Active Subscriptions
    • Delete User
  • Events API Docs
    • Different Types of Events
    • SSO Login Flow
  • Discount Coupon
    • Dynamic Coupon API Generation:
  • New Webhooks
    • Meter Banner Webhook
    • Paywall Webhook
    • SignUp Webhook
    • Refund Webhook
    • Purchase Webhook
    • Subscription Landing Page Webhook
    • Popup Webhook
    • User Update Webhook
    • Payment Gateway Webhook
    • Review Page Webhook
    • Transaction Webhook
    • Login Webhook
    • Cancel Subscription Webhook
  • Old Webhooks
    • Sign Up Webhook
    • Login Webhook
    • Subscription Payment Webhook
    • Subscription Cancelled Webhook
    • Pass Payment Webhook
    • Subscription Bundle Payment Webhook
    • Review Subscription Webhook
    • Micro Payment Webhook
    • How to validate Webhooks?
  • Registering The Content
    • Create Content
    • Edit Content
    • View Content
  • Country Code List
  • Supported Currencies and Payment Gateways
    • Stripe Supported Country with Currency
    • Razorpay Supported Country with Currency
    • Paypal Supported Country with Currency
  • Errors
  • Loyalty System
    • Web SDK
    • iOS SDK
    • Android SDK
    • Flutter SDK
    • API from server
Powered by GitBook
On this page
  1. Version 2.0
  2. Mobile SDK

Google In-App Purchases with Conscent

To enable the Google Play Android Developer API and the Google Play Developer Reporting API for your Google Cloud project, follow the steps outlined below:

Step 1. Enable the Google Developer and Reporting API

  1. Access the Google API Console: Open your browser and go to the Google API Console.

  2. Select Your Project: Choose an existing project or create a new one.

  3. Enable the Required APIs:

    1. Navigate to Library within the API Console.

    2. Search for and select the following APIs:

      1. Google Play Android Developer API

      2. Google Play Developer Reporting API

    3. Click Enable for each API.

Note: If the API is already enabled, you will see a Manage button instead.

  1. Set Up Credentials:

    1. Once the APIs are enabled, you’ll be redirected to the API’s main page.

    2. If no credentials are set up, follow these steps to create them:

      1. Click on Create Credentials.

      2. Follow the on-screen prompts to generate the necessary credentials (OAuth 2.0, API keys, or service accounts) based on your project needs.

      3. Ensure that these credentials are created by the project owner or a user with the appropriate permissions.

Important: User permissions are defined in Step 3 of the Google Play Console and are required to access the Developer and Reporting APIs.

  1. Verify Permissions in Google Play Console:

    1. Go to your Google Play Console and ensure the project owner or authorized user has the necessary permissions under Settings > Permissions.

Step 2. Create a Service Account

  1. Navigate to Service Accounts

    1. Open the Google Cloud Console.

    2. Go to IAM & Admin > Service Accounts.

    3. Alternatively, if you're in the Google Play Console, you can reach this page from the last setup screen.

  2. Create the Service Account

    1. Click Create Service Account.

    2. Enter a name for the service account (e.g., "Platform Server Notifications Service").

    3. Click Create and continue.

  3. Assign Roles to the Service Account

    1. In the Grant this service account access to the project section, add the following roles:

      1. Pub/Sub Admin: Enables the account to manage Platform Server Notifications.

      2. Monitoring Viewer: Allows monitoring of the notification queue.

    2. Tip: If you can’t find these roles via search, manually browse for them under the Pub/Sub and Monitoring folders.

  4. Download the JSON Key

    1. Once the roles are assigned, navigate to the Service Accounts page in the Google Cloud Console.

    2. In the Actions menu (three dots) for the new service account, select Manage Keys.

    3. Click Add Key > Create new key.

    4. Choose the JSON format and download the JSON key.

    5. Important: Keep this JSON key secure, as it will be required in Step 4 of the setup process.

Step 3. Grant Financial Access

  1. Access Users and Permissions

    1. In the Google Play Console, navigate to the Developer homepage.

    2. Go to Users and Permissions.

  2. Invite the Service Account

    1. Click on Invite user.

    2. Enter the email address of the service account created in Step 2.

  3. Set Permissions

    1. Under App permissions, select your app to grant permissions specific to it.

    2. Under Account permissions, enable the following permissions:

      1. View app information and download bulk reports (read-only): Allows access to view app details and download bulk data reports.

      2. View financial data, orders, and cancellation survey responses: Grants access to financial data and customer feedback.

      3. Manage orders and subscriptions: Allows management of customer orders and subscriptions.

  • Note: Other permissions can be set based on your needs, but the three permissions listed above are essential for financial access.

  1. Send the Invitation

    1. Scroll to the bottom and click Invite user to activate the service account under Users and Permissions.

Step 4. Share Credentials JSON and Package Name

Package Name

Provide the unique package name for your application (e.g., com.example.app).

JSON Key

To integrate with Google Cloud, you must share the JSON Key from Step 2 with the Customer Success or Product Team securely.

Push Notification Configuration

During Google Cloud Console configuration, push notifications must be set up to work with Conscent.

  • Set up push notifications with the URL provided by Conscent and the Play Console.

Subscription Plans Configuration (Conscent Dashboard)

Please provide the following details for each subscription plan you wish to configure:

Required Details
Description

Subscription Product ID

Unique identifier for the subscription plan (e.g., sub_monthly).

Base Plan ID

Base plan identifier (e.g., base_plan_123).

User Purchase Information:

To complete the user purchase tracking, provide the following details:

Required Details
Description

User Purchase Country

The country of the user making the purchase (e.g., IN, US).

Base Plan ID

Base plan identifier associated with the purchase (e.g., base_plan_123).

Subscription Product ID

Unique product identifier for the purchased item (e.g., prod_456).

Purchase Token

Purchase token generated after the user completes a purchase (e.g., purchase_token_xyz123).

Example Purchase Details:

{
  "orderId": "GPA.3311-5236-4464-24316",
  "packageName": "com.csc_demo",
  "productId": "conscent_product_id_1_m",
  "purchaseTime": "1738058807395",
  "purchaseState": 0,
  "purchaseToken": "ajibimdaeaiadogkflhpeggn.AO-J1OzRSKQF3Xyr4BHuN3Mxqe7YQwCqZwjB1G_Mi5IiIEL6hH64bAC1ak7TO4SGbh3zu5dOJkiUAx2Gc_-83xcLpHQrV-s9mw",
  "quantity": 1,
  "autoRenewing": true,
  "acknowledged": false
}
PreviousReact Native SDKNextApple In-App Purchases with Conscent

Last updated 2 months ago

Follow the detailed guide here for push notification configuration:

Note: Add the Conscent webhook URL to the Google account.

Simplifying Google Play Console Cloud Project Setup
​