6

Per Google's documentation on 'Testing In-app Billing', there are four reserved product IDs to be used for in-app testing of the billing and subscription services:

  • android.test.purchased
  • android.test.canceled
  • android.test.refunded
  • android.test.item_unavailable

What is the reserved product ID that we can use to test in-app subscriptions end-to-end, which was introduced by google last week? android.test.purchased applies to the "inapp" product type only, not the "subs" product type.

esilver
  • 27,713
  • 23
  • 122
  • 168

1 Answers1

0

I am able to test in-app subscriptions by creating an inexpensive test subscription that is only shown on debug builds (but is in all other ways a valid product on Google Play). By using a test account described here I am able to purchase the subscription product and test end-to-end.

Here is what it says about test accounts:

To test your in-app billing implementation with actual in-app purchases, you will need to register at least one test account on the Google Play publisher site. You cannot use your developer account to test the complete in-app purchase process because Google Wallet does not let you buy items from yourself. If you have not set up test accounts before, see Setting up test accounts.

Also, a test account can purchase an item in your product list only if the item is published. The application does not need to be published, but the item does need to be published.

When you use a test account to purchase items, the test account is billed through Google Wallet and your Google Wallet Merchant account receives a payout for the purchase. Therefore, you may want to refund purchases that are made with test accounts, otherwise the purchases will show up as actual payouts to your merchant account.

esilver
  • 27,713
  • 23
  • 122
  • 168
  • you may be redirect the future visiters to given link below instead of your link: http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test Future visiter can directly see your commented lines into developer document. – Maulik Oct 03 '13 at 07:54
  • 2
    check this link: http://developer.android.com/google/play/billing/billing_testing.html#testing-purchases Requirements for using test purchases If you plan to use test purchases, please note the requirements and limitations below: 1) Test purchases is only supported for license test accounts when the app is using the In-app Billing v3 API. 2) Test purchases are only supported for in-app products, not for in-app subscriptions. How can you successfully test subscription? I mean have you paid product payment from the google wallet and then get refund? or how can I test without giving any payment? – Maulik Oct 03 '13 at 08:03