How to test InAppPurchase Subscription renewal in sandbox mode - android

I am using InAppPurchase to sell subscription to users with one month plan.
Setup is done and i can test Purchase flow, but renewal is not working in sand-box mode.
I am using billing library version 4
implementation 'com.android.billingclient:billing:4.0.0'
After successfull purchase while validating receipt on server side getting autoRenew param in json with value blank. After 5 min plan is expired as describe in doc, but as per doc auto renew will expires after 6 times. In my case after first purchase auto renew not happening.
Can any one help me in this where i am wrong in this.
I already spent 4 days in searching for this issue.
Thanks in advance

From your screenshot I'm deducing you are in India.
A few months ago, Google has announced that it would pause new signups of auto-renewing subscriptions for users in India:
Subscriptions will continue to be available as single access passes that provide users a single billing period of access (eg. 1-month access). At the end of the billing duration, Google says users will need to sign up again in order to continue their subscription.
source: https://www.xda-developers.com/google-play-suspend-free-trials-auto-renewing-subscriptions/
Maybe you should try to test on another market.

Related

Managing Multi platform Application In-App Purchases

I am developing an App with Flutter and Firebase as backend. Here in the app, I want to use to the In-App purchases with trial for a month and then monthly or yearly Subscription on both iOS and Android Platforms.
Can anyone suggest the better way to work with the scenario like this?
The way I know is to upload the receipt from both platforms on server for verification from corresponding Store (we can verify receipts on App end as well for first time) and update the User node with In-App purchase related info. Then we can Schedule a cron to verify In-app purchase day before (basically two days i.e Day before and on Expiration day if not updated) the subscription get over.
And how we can manage it with Firebase only without cost for additional server to put the logic files to verify the In-App Purchases?
Thanks

How determine from client side if Google Play Billing subscription is expired

I have implemented Subscriptions in mine Android app, and wondering how to check expired subscription. As I understood, expired subscription should not be returned in getPurchases() method.
The problem is - I tested 1 month subscription using test account (which renews subscription every 5 minutes, as described here https://developer.android.com/google/play/billing/billing_testing#testing-subscriptions), and after expiration time I still recieved that purchase in getPurchases(), even after 1 day. However, if I manually tried to subscribe one more time, Play Market didn`t refuse, and everything worked fine.
Also, when I was selecting 'decline payment' in subscription settings, it dissapeared from purchases list, as it supposed to be.
Thanks in advance.
I didn't understand what do you mean by "renews every 5 minutes".
Once you subscribe to Google play to any app/service, it will be available until the end of the subscription.
For example:
I purchased a subscription with an APP for 6 months.
I went to Google Play after 2 days and canceled my subscription but the app will still see that I am subscribed for the remaining 6 months because I already paid the subscription fees.
It's not something that you can handle from Google Play :)
Hope this helps.

Android In App BIlling v3 - Wrong Subscription Trial Period

I am using the Android In App BIlling v3 library, and when I call
bp.subscribe(Activity, subscriptionID)
I get the Google Play purchase window, but the biling period is always 'per day', and the trial period is always '1 day'.
I have configured my subscription to have:
Billing Period: Yearly
Free Trial Period: 15 days
Default Price: $12
Using the above configuration, my App shows the purchase details as:
1 day trial
$12.00 / day
Library documentation says nothing. Tried to Google it, can't find anything.. Am I the only one getting this??
Thanks.
This is a normal response. I guess you're testing with an account added as a tester to Google Play account. Test subscriptions are valid for 1 day and get cancelled after 1 day.
Quoting the official docs
Note: Test subscription purchases recur daily, regardless of the
product's subscription period.

google android In-app purchase testing issues

My app is published in alpha, and allows for purchasing a yearly subscription with a 7-days trial period.
I just tested the purchase process with a test account (declared as such in dev console).
The purchase went ok, and the user received a mail confirming his purchase. This mail is full of mistakes:
1) the price is without tax, which is confusing
2) It says the trial-period will expire tomorrow, instead of in 7 days (we are on Feb 27):
You have signed up for a free trial subscription from xxx on Google
Play. Your trial will end on Feb 28, 2015. You will be automatically
subscribed for €15.83/day at the end of your trial unless you cancel.
3) Funnily enough, it says that after the trial period, he will be charged DAILY, instead of yearly:
By subscribing you authorize us to charge you the subscription cost
(currently €15.83/day) automatically, charged daily to the payment
method provided. You can cancel at any time
Moreover, I couldn't find a way to cancel the subscription. I went to the wallet account of the user, no transaction there. Same thing in the merchant wallet account from my side. How am I supposed to cancel the transaction and try again eventually?
The only good point is that my app and google api (V3) recognizes that the user has purchased the subscription.
Maybe it's just because I declared the user as a test-user in google-dev console?
Thanks in advance for any input or advice.
The reason why it says 'day' instead of year is answered here:
Android In App BIlling v3 - Wrong Subscription Trial Period
This is a normal response. I guess you're testing with an account
added as a tester to Google Play account. Test subscriptions are valid
for 1 day and get cancelled after 1 day.
Quoting the official docs
http://developer.android.com/google/play/billing/billing_testing.html
Note: Test subscription purchases recur daily, regardless of the
product's subscription period.

How to test autorenewal subscriptions on Android

I would like to add a autorenewal subscriptions to my Android app. All code is implemented and passed basic tests, but there is one important use case - I need to ensure, that renewal process (monthly payment) works fine. My server side is responsible for checking of purchase status using Google APIs and I don`t want to wait 1 months in order to check how it works in different cases.
Apple provides a sandbox, where I can configure subscription (its possible to have subscription for 1 minutes and so on).
Does Google provides something similar (sandbox, test API, etc.) that might help to verify described case?
Thanks,
Alex
Current answer - there is no way to do it. Sad, but truth.
Google Play has already implemented a sandbox to test subscriptions and issue purchases. You need to publish your app in beta and after a few hours of doing that the test users(added in Google Play dev console) can make test purchases(these are not charged) in your app. They can even make subscription test purchases. A test subscription automatically renews every day(until canceled from Google Play) irrespective of the subscription duration.
http://developer.android.com/google/play/billing/billing_testing.html
Also see this: Testing Android IAP/In-App Purchase Subscriptions

Categories

Resources