Appearance
Android Reucrring Plan Setup
Follow this step-by-step guide to create and configure Android recurring subscription plan in Google Play Console for your Android application.
Setup Android Subscription Plan
1. Create the Subscription Product in Google Play Console
- Open Google Play Console.
- Select the required application.
- Go to Monetize with Play → Products → Subscriptions.
- Click Create subscription.
- Click Create.
Subscription Details
Enter the required subscription details.
Example
Product ID : com.gobiz.intermediate.recurring.plan
Name : Intermediate PlanImportant: The Product ID cannot be changed or reused after the subscription has been created.
2. Add a Base Plan
After creating the subscription, open the newly created subscription.
Under Base plans and offers, click Add base plan.
Base Plan Configuration
Example
Base Plan ID : recurring
Type : Auto-renewingNote: The Base Plan ID must follow Google Play's naming rules and cannot be changed after the plan is created.
Click Save to create the base plan.
3. Configure Price and Availability
Open the newly created base plan and configure the Price and availability section.
- Select All regions.
- Review the regional pricing generated by Google Play.
- Set or verify the required regional prices.
- Save the pricing configuration.
Example
text
Subscription: Intermediate Plan
Billing Period: Monthly
Price: $20.00After saving the regional prices, Google Play displays a confirmation that the pricing configuration has been saved.
4. Activate the Base Plan
After the pricing configuration has been saved:
- Return to the subscription.
- Verify that the base plan is listed under Base plans and offers.
- Confirm that the base plan is Active.
- If the base plan is inactive, use the available activation option to activate it.
5. Identify the Google Play Subscription Details
The Android application requires both the Product ID and Base Plan ID.
Example
text
Product ID: com.gobiz.intermediate.recurring.plan
Base Plan ID: recurringUse the actual values configured in Google Play Console.
6. Configure the Plan in GoBiz Admin Panel
- Log in to the GoBiz Admin Panel.
- Go to Plans.
- Locate the corresponding plan.
- Open the plan's Edit option.
Example
text
Plan Name: Intermediate Plan
Plan Price: $20.00
Plan Validity: Monthly
Status: Active7. Configure In-App Purchase Details
Scroll to In-App Purchase Details (Mobile App).
Enter the Android subscription details.
Example
Purchase Type : Recurring
Product ID : com.gobiz.intermediate.recurring.plan
Plan ID : recurring-monthlyPurchase Type
Select Recurring for a recurring subscription.
Product ID
Enter the Product ID created in Google Play Console.
Plan ID
Enter the corresponding GoBiz application-side Plan ID for the subscription.
The Product ID must exactly match the Product ID configured in Google Play Console. The Plan ID should match the identifier expected by the GoBiz Android application.
8. Save the Plan Configuration
- Verify that the Product ID matches the Product ID in Google Play Console.
- Verify that the Plan ID is the correct identifier for the corresponding GoBiz subscription.
- Click Save.
Video Tutorial
Android Google Play Pub/Sub Setup
how to configure Google Play Real-Time Developer Notifications (RTDN) for Android subscriptions using Google Cloud Pub/Sub
1. Google Cloud Project
Open the required project in Google Cloud Console.
Example project
text
Project name: GoBiz Demo
Project ID: gobiz-demoAll Pub/Sub resources used for this integration should be created inside the Google Cloud project configured for the Android application.
2. Create a Google Cloud Service Account
Open:
Google Cloud Console → IAM & Admin → Service Accounts
Click Create service account.
Service account configuration
Example
Service account name : play-api
Service account ID : play-api
Description : To receive Google Play subscription messages.
Role : Pub/Sub AdminThe resulting service-account email will look similar to:
Click Create and continue and complete the service-account creation.
3. Create the Service Account JSON Key
After creating the service account:
- Open Google Cloud Console → IAM & Admin → Service Accounts.
- Locate the
play-apiservice account. - Open the Actions menu.
- Select Manage keys.
- Click Add key.
- Select Create new key.
- Select JSON.
- Click Create.
Google Cloud will download the JSON credentials file to your computer.
Rename the downloaded file to:
text
service-accounts.jsonThis file is required by the server-side application to authenticate with Google APIs.
4. Create the Pub/Sub Topic
Open:
Google Cloud Console → Pub/Sub → Topics
Click Create topic.
Topic configuration
Set the Topic ID to:
text
play-notificationsEnable:
text
Add a default subscriptionAfter creation, the topic resource will look similar to:
text
projects/gobiz-demo/topics/play-notificationsVerify that the topic appears under:
Pub/Sub → Topics
Configure the topic in Google Play Console
Copy the complete topic name:
text
projects/gobiz-demo/topics/play-notificationsThen open:
Google Play Console → Monetize with Play → Monetization setup
Paste the complete topic name into the Topic name field.
Save the configuration.
Important: Use the complete Pub/Sub resource name, not only
play-notifications.
5. Grant Pub/Sub Publisher Permission
Google Play needs permission to publish RTDN messages to the Pub/Sub topic.
Open:
Google Cloud Console → Pub/Sub → Topics
Select:
text
play-notificationsOpen the topic's Permissions / Access configuration and select Grant access.
Principal
Add:
Role
Assign:
text
Pub/Sub PublisherSave the permission.
Verify the permission
Open the topic's permissions panel and confirm that the following entry exists:
text
Role: Pub/Sub Publisher
Principal:[email protected]Google Cloud may indicate that the permission change can take a few minutes to become active.
Important: Do not use the
play-apiservice account as the publisher principal. Google Play publishes RTDN messages using[email protected].
6. Configure Google Play Console Permissions
Open:
Google Play Console → Users and permissions
Click Invite new users.
Enter the Google Cloud service-account email created in Step 2.
Example
Important: Use the
play-apiservice account here.
6.1 Grant App Permission
Under App permissions:
- Select your application.
- Click Apply.
- Grant:
text
- View app information (read-only)
- View financial data
- Manage orders and subscriptionsDo not grant Admin (all permissions) unless the application integration specifically requires it.
These permissions allow the server-side integration to access the Google Play purchase and subscription information required for subscription management.
Click Apply / Invite user to save the permissions.
Verify the service-account permissions
The play-api service account should have:
text
App permission: View app information (read-only)
Financial permissions: View financial data
Manage orders and subscriptions7. Configure Google Play Real-Time Developer Notifications
Open the Android application in Google Play Console.
Navigate to:
Monetize with Play → Monetization setup
Find:
Google Play Billing
Locate:
Real-time developer notifications
Enable:
text
Enable real-time notifications7.1 Enter the Pub/Sub Topic
In Topic name, enter the complete Pub/Sub topic resource:
text
projects/gobiz-demo/topics/play-notificationsThe complete resource name is required.
Google Play will publish subscription and purchase notification messages to this Pub/Sub topic.
7.2 Select Notification Content
Select:
text
Subscriptions and voided purchases onlySave the Google Play Billing configuration.
Verify the RTDN configuration
Before continuing, confirm:
text
RTDN: Enabled
Topic: projects/gobiz-demo/topics/play-notifications
Notification content: Subscriptions and voided purchases only8. Create the Pub/Sub Subscription
Open:
Google Cloud Console → Pub/Sub → Subscriptions
If Add a default subscription was enabled while creating the topic, a subscription may already have been created automatically.
The expected subscription name in this setup is:
text
play-notifications-subIf it does not already exist, create a subscription for the topic.
Subscription configuration
text
Subscription ID: play-notifications-subThe resulting subscription resource will look similar to:
text
projects/gobiz-demo/subscriptions/play-notifications-subThe subscription must be attached to:
text
projects/gobiz-demo/topics/play-notificationsVerify the subscription
Confirm that:
text
Subscription: play-notifications-sub
Topic: play-notificationsThe subscription is responsible for receiving messages published by Google Play to the Pub/Sub topic.
9. Configure the Subscription Delivery Type
Open:
Google Cloud Console → Pub/Sub → Subscriptions → play-notifications-sub
Click Edit.
Change the delivery type to:
text
PushThe push subscription sends Pub/Sub messages directly to the application's webhook endpoint.
9.1 Get the Android Webhook URL
Open the GoBiz Admin Panel.
Navigate to:
Plugins → Mobile App API
Locate:
Webhook URL (Android)
Copy the Android webhook URL.
9.2 Configure the Push Endpoint
Return to:
Google Cloud Console → Pub/Sub → Subscriptions → play-notifications-sub → Edit
Under Push configuration, set:
text
Delivery type: Push
Endpoint URL: <Android Webhook URL copied from GoBiz Admin Panel>9.3 Enable Authentication
select Enable.
For Service account, select the service account created in Step 2:
For Audience (Optional), enter the same webhook endpoint URL.
Push configuration should look similar to:
text
Delivery type: Push
Endpoint URL: <Android Webhook URL>
Authentication: Enabled
Service account: [email protected]
Audience: <Android Webhook URL>Save the subscription configuration.
9.4 Test the Google Play Notification
After saving the Pub/Sub push configuration:
- Open Google Play Console.
- Navigate to Monetize with Play → Monetization setup.
- Open the Google Play Billing configuration.
- Locate the configured Topic name.
- Click Send test notification.
Google Play will send a test RTDN message to the configured Pub/Sub topic.
The Pub/Sub subscription should then deliver the message to the configured Android webhook endpoint.
If the test notification reaches the application successfully, the Pub/Sub RTDN connection is configured correctly.
10. Server Configuration — Upload service-accounts.json
The Google Cloud service-account JSON file created in Step 3 must be uploaded to the application server.
Open the server's File Manager.
Navigate to:
text
storage
└── app
└── googleIf the google directory already exists, open it.
Upload:
text
service-accounts.jsonThe final file path must be:
text
storage/app/google/service-accounts.json