Dean Wild
Dean Wild

Reputation: 5954

Testing Android IAP/In-App Purchase Subscriptions

I am implementing several Android applications to be launched on Google Play and they all have subscriptions using the Google IAP auto-renewing subscription product type.

To test the app I have done the following:

I am now able to successfully test my purchase and every thing works. However, as far as I can see, this purchase is real and the subscription is actually valid for an entire month.

Is there no way to do any kind of "sandbox" testing or at least a way to prematurely cancel this subscription?

How can I test the scenario where my subscription has expired without having to wait a month?!

Any help is much appreciated!

Upvotes: 8

Views: 5038

Answers (3)

javisilox
javisilox

Reputation: 95

As they has said, you can do it following de goolge documentation:

http://developer.android.com/google/play/billing/billing_testing.html

The only thing you need is to add an acount for test:

Luego crea cuentas de prueba de licencias para los usuarios autorizados. En la Developer Console, ve a Settings > Account details y luego, en la sección License Testing, agrega las direcciones en el campo Gmail accounts with testing access. Para obtener más información, consulta Configuración para compras de prueba. Blockquote

Upvotes: -1

Areeb
Areeb

Reputation: 91

Google has finally added a way to test subscriptions. Their documentation now says:

Test purchases, which let your selected license-test users purchase your in-app products without any resulting charges to the user. Test purchases can be used in alpha/beta releases or in published apps.

Note: Test subscription purchases recur daily, regardless of the product's subscription period.

http://developer.android.com/google/play/billing/billing_testing.html

But I don’t know when Google made the update to this documentation.

Upvotes: 5

Nikolay Elenkov
Nikolay Elenkov

Reputation: 52936

Not for subscriptions. The new (v3) in-app billing API has been released, but it currently does not support subscriptions. When it does, it might bring an easier way to test (seems unlikely though). You just have to cancel subscriptions/purchases in the merchant console when you are done testing.

Upvotes: 3

Related Questions