Addon ID

  • emi_indo_androidbillingverifier

Info

Statistics

  • Download count84 total downloads
  • Latest download count 11 downloads of latest version
  • Average download count1 downloads per day average

Owners

📘 Full Guide: Configuring Google Service Account for Billing Verification

Welcome to the official setup guide for cordova-plugin-google-play-verify.

💸 Why choose this plugin? (Free vs Paid)

Unlike third-party services (e.g., RevenueCat, Qonversion) that charge monthly fees or take a cut of your revenue, this plugin is 100% FREE.

  • Direct Connection: We connect your app directly to Google's official infrastructure (Google Cloud Platform).
  • No Middleman: Your data stays between you and Google. No third-party servers involved.
  • Zero Cost: Because we use the official GCP path, you avoid the "convenience tax" charged by others.

---

💰 FAQ: Is Google Cloud Platform (GCP) Paid?

Short Answer: No, for this specific usage.

  • Credit Card Requirement: Google requires a credit card or valid billing method to verify your identity during sign-up.
  • The "Free Tier": This plugin uses the Android Publisher API. Google provides a massive free quota of 200,000 requests per day.
  • Actual Cost: As long as you only use the API for verification and don't activate paid services (like Cloud SQL or heavy VM instances), you will be charged $0.

---

📂 Pro-Tip: Project Management

---

🏗️ PART 1: Google Cloud Platform (GCP) Setup

In this phase, we will create the "Robot" (Service Account) and generate its credentials.

Step 1: Create a New Project

Video Guide: https://youtu.be/5pKrh6cGEQY

  1. Navigate to the https://console.cloud.google.com/.
  2. Click the project dropdown in the top-left header.
  3. Click New Project.
  4. Project Name: Enter something recognizable, e.g., My-Billing-Manager.
  5. Click Create and then Select the project.

Step 2: Enable the Android Publisher API

  1. In the left sidebar, go to APIs & Services > Library.
  2. Search for: Google Play Android Developer API.
  3. Select it and click the blue Enable button.

Step 3: Create the Service Account

  1. In the left sidebar, go to IAM & Admin > Service Accounts.
  2. Click + Create Service Account.
  3. Details: Name it sub-verifier.
  4. Access: Choose the role Basic > Owner.
  5. Click Done.

Step 4: Generate the JSON Key

  1. In the Service Accounts list, click on the Email you just created.
  2. Go to the Keys tab.
  3. Click Add Key > Create new key.
  4. Select JSON and click Create.
  5. A .json file will download.

---

🔐 PART 2: Google Play Console Setup

Video Guide: https://youtu.be/DRwKnr-iIoc

Important: Creating the bot in GCP is only half the battle. You must now "invite" it into your Play Store.

Step 1: Invite the User

  1. Go to the https://play.google.com/console.
  2. In the left sidebar (scroll down), click Users and permissions.
  3. Click Invite new users.
  4. Email address: Paste the Service Account Email you copied in Part 1.

Step 2: Grant Financial Permissions (Mandatory)

If you skip this, you will get Error 401/403.

  1. App Permissions Tab: Click Add app, select your app, and click Apply.
  2. Account Permissions Tab: Scroll to the Financial data section.
  3. Check View financial data, orders, and cancellation survey responses.
  4. Check Manage orders and subscriptions.
  5. Click Invite user.

---

🚀 PART 3: App Release & In-App Products Setup

Step 1: Upload Your APK/AAB

  1. In the Google Play Console, go to Testing > Internal testing (or Closed testing).
  2. Create a new release and upload your app's .aab or .apk file.
  3. Roll out the release and wait for Google's initial approval/review process to complete.

Step 2: Create Subscriptions / Products

  1. Once your app is approved, navigate to the left sidebar under Monetize > Products.
  2. Click on Subscriptions (or In-app products).
  3. Click Create subscription and configure your Product ID, Base plan, and Pricing.

Step 3: Match Your IDs Exactly (Crucial)

To ensure the cordova-plugin-google-play-verify works flawlessly, double-check these parameters in your code:

  • packageName: Must perfectly match your app's bundle ID (e.g., com.yourcompany.yourgame).
  • productId: Must perfectly match the Subscription ID you just created in the Play Console (e.g., premium_monthly).

---

🍏 PART 4: Apple App Store Validation (iOS)

Starting from version v1.0.0.3, the plugin supports direct validation with Apple's servers.

Construct 3 Action: Get apple subscription status

Use this action to verify iOS subscriptions. Here are the parameters you need to provide:

  • User ID (Optional): Custom user ID for your own tracking or logging. Leave empty if not needed.
  • Shared Secret: The App-Specific Shared Secret string generated from your App Store Connect account. (Required by Apple to validate auto-renewable subscriptions). Read Apple's official guide on how to generate a shared secret here.
  • Purchase Token: The App Receipt Base64 string from the iOS device. You can easily get this by using the plugin's LatestToken expression.
  • Product ID: The Subscription SKU ID to check (e.g., 'premium_monthly').
  • Is Sandbox (Boolean): Check this (True) if you are testing via TestFlight or Simulator. Uncheck this (False) for Production/App Store release.
  • Throttle Interval: Minimum minutes between verification checks (Set to 0 to disable throttling).

---

Forum | Note release

construct.net/en/forum/construct-3/plugin-sdk-10/new-free-addons-in-app-187928

❓ Troubleshooting FAQ

Q: I am getting "Error 403: Insufficient permissions"

This means the Service Account bot hasn't been given "Financial" access in the Play Console.

  • Solution: Go back to Part 2, Step 2. Ensure both "View financial data" and "Manage orders" are checked. Wait 24 hours if you just changed this, as Google's cache takes time to update.

Q: Why do I need to do this manually?

By setting this up yourself, you own the "Security Gateway." No third-party company can see your revenue, and you are not dependent on their servers. You are the master of your own data.

Q: Is the V3 API really necessary?

Yes. Older versions (v1, v2) are being phased out. This plugin uses v3, which is the most secure and feature-rich version for modern Android apps.