How to set up in apps purchase in Android (for dev)

You can only set up a one-time or recurring plan on your platform. Both types cannot be used at the same time.

To find out how to set up in-apps purchases for buying recurring subscription and how to set up server to receive Plays Store server notification, please refer How to set up in apps purchase in Android (for client)

TEST PLAY STORE SERVER NOTIFICATION

  1. Go to Play console: https://play.google.com/apps/publish
  2. Select your app

  1. Scroll to Monetize, click on Monetization setup

inapp_android_12

  1. Click on Send test notification

inapp_android_25

  1. Go to Google console: https://console.cloud.google.com/
  2. At Navigation menu, scroll to ANALYTICS section, click on Pub/Sub

inapp_android_26

  1. Click on Topic ID

inapp_android_27

  1. Click on subscription ID

inapp_android_28

  1. You can view the request count at METRICS tab

CREATE TEST ACCOUNT

  1. Go to Play console: https://play.google.com/apps/publish
  2. Select the app you want to create test account

inapp_android_24

  1. At Navigation menu, scroll to Testing section, click on Internal testing and select Testers tab

  1. Click on Create email list

  1. Create email list

(1) List name: Enter your list name

(2)  Add email address: Enter email address of testers

(3) Upload CSV file: If not enter email at (2), you can upload csv file here

(4) Email addresses added: List the email that you enter or upload

(5) Save changes

  1. Enable the list name and click on Save button

TESTING IN APPS PURCHASE ON DEVICE

  1. Open Play Store and login the email you created test account

  1. Open your app and buy subscription, you will see the test card

inapp_android_29

  1. Click on the test card, you can choose the case to test: approve or decline.

inapp_android_30

  1. After buy subscription successfully (approve or decline), you can view the order manager by accessing https://play.google.com/console and opening Order Management menu

inapp_android_31

Note: Renewal periods: Test subscriptions renew more quickly than actual subscriptions, and test subscriptions can renew a maximum of six times.

The following table lists the testing renewal times for subscriptions of various durations. These times are approximate.

Last Updated On June 05, 2024