I am using google in-app subscription I am able to test the using app store.
Now what I want to achieve is I want to start the subscription at a specific date.
For example, Today is 10th of the month and user subscribe and I want to start the subscription form the 15th of the month.
How should I achieve this?
If the delay is always, for example, 5 days you can set a period of free trial > 3 days in the Google Play Console.
You can defer the billing.
I don't think that you can postpone the subscription , because the subscription start at the user validation. However maybe you can display the subscription popup at a specific date, not sure that is compliant with good practice.
Hope it's help.
Related
I hope I'm in the right place to ask this question. If not, please help to point out a better place to ask this.
I have a subscription-based app.
Now, I want to give a free period of subscription to a user who is already subscribing to my app.
For example, if the user started a monthly subscription (not a trial) on the 1st of July 2021. The original next billing date should be the 1st of August 2021.
But on the 15th of July, I give him a free month, then he shouldn't be billed on the 1st of August, instead, the next billing should become 1st of September.
Or if on the 15th of July, instead of giving 1 month free, I give him 2 weeks free, then the next billing cycle should be changed to 15th of August, and the consecutive billing cycle should be changed as well to reflect the 2 weeks period.
How can I do that with Google Play and Apple App Store?
I thought of the Promotion Codes. But it requires the user to unsubscribe and then enter the promotion code. A very tedious process.
I want to be able to give it without the user need to do anything else.
An example of App that does this is ExpressVPN, which adds a free-30-days for every successful referral. So if I can convince 2 of my friends to purchase a subscription, I will get 2x 30 days free on my subscription and my billing cycle will be pushed back accordingly. They also charge through the App Store / Google Play billing methods.
Promotion codes is way to giving free subscription for a user and testing purpose In-App Purchase.And other way you can generate the token from back-end behalf of promotion codes.
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.
I am implementing an in-app subscription in an Android app. In the developer console I have a subscription item with a 7 day free trial. While debugging, I purchased this subscription. A couple days later, before the 7 day trial is over, I cancelled the subscription from the Play Store | My Apps | Subscriptions.
Many days later, long after the 7 day trial period, in my code when I get the owned subscriptions (with inAppBillingService.getPurchases()) it still says I own the subscription. Since I cancelled it during the trial, I am not billed for it, but also, I no longer own that subscription. As far as I can tell, this is a bug with Google's In-App Billing Service. Any one know how this bug can be reported to Google so it can be fixed? As it is right now, customers can purchase my subscription and then cancel it during the trial period. They then get to keep using the subscription because Google says they own it. This is a MAJOR BUG.
I went ahead and tested this in my app. Using the sample app, I call the method launchSubscriptionPurchaseFlow() from the IabHelper class to start the subscription purchase. After the user confirms it, I get the purchase validated and handle the UI update on OnIabPurchaseFinishedListener.
I also check every time on my activity's onCreate() method if the user has the purchased items and subscriptions. This is done with the method queryInventoryAsync() of the same class. In my case, after canceling the subscription and waiting a few hours after the 7 days trial period elapsed, the user no longer had the subscription. You can test this by checking in the Purchase object if myPurchase.getPurchaseState() != 0. Possible purchase state values are listed in the documentation.
Finally, note that the cancellation will not be propagated immediately so it might take more than 7 days for that to go through. And it will take at least 7 days regardless of when the user cancels it. According to the documentation:
When the user cancels a subscription, Google Play does not offer a
refund for the current billing cycle. Instead, it allows the user to
have access to the cancelled subscription until the end of the current
billing cycle, at which time it terminates the subscription. For
example, if a user purchases a monthly subscription and cancels it on
the 15th day of the cycle, Google Play will consider the subscription
valid until the end of the 30th day (or other day, depending on the
month).
Hope that helps.
Now that a month has passed, I have more info.
Clearly what I was seeing in October IS A BUG in Google's code.
With absolutely NO change to my code, everything works as it should in the code deployed from the play store. This was true for alpha, beta and production.
It did not work as expected for code installed on the device from Eclipse - hence the Google BUG.
1.Is there a way by which we can make the subscription permanent?Once the user subscribe for the app he will be able to use it for free as long as he/she wishes.
2.Also can we limit the monthly subscription to a certain period.i.e. the user must subscribe for minimum of 12 months?
Please guide
than it is not a subscription, just an in-app purchase
no, you can use 1 year subscriptions only
1) as #xnagyg said, you should represent such a product as an 'in-app purchase' rather than a 'subscription'. Subscriptions by nature can be renewed (paid for repeatedly to resubscribe). Note that Subscriptions autorenew by default (you have no option there, the User must cancel to stop it autorenewing).
2) Currently, the Google Play Developer Console allows these Billing periods:
Weekly
Monthly
3 months
6 months
Yearly
Seasonal
Scenario:
I am on the verge of completing my google playstore in-app billing implementation. I am using a monthly or yearly subscription in order to charge my consumers.
Problem: I can't seem to find a way to remove a subscription from active state, since cancellation simply stops the billing from occurring. This doesn't allow QA to thoroughly test the purchase procedure without creating an account for each test, or waiting until the subscription period ends.
Question: Have I missed or am wrong about something? If so, what is it? If not, what should be done to allow QA to do proper testing?
According to what I have understood from your question,
you can not test subscription from the test account. Google play doesn't provide subscription testing using dummy product. you have to test on the real product.
Now question arises how can I test subscription
you can check subscription by purchasing real product and check product status or purchase cancellation using the purchase status api from your server.
you can also get more information from the given link below for the step by step cancellation purchase status:
1) link1
2) link2
you can simply query every day and check your subscription is valid or not and also get it's expiration date.
I also have one other option with out pay for any charges on your real product, you can set trial period in the Google console and before trial period ends up cancel subscription from the Google play store Menu -> MyApp -> Subsciption and cancel product and check above procedure given in the links.
EDIT:
Important: In all cases, you must continue to offer the content that
your subscribers have purchased through their subscriptions, for as
long any users are able to access it. That is, you must not remove any
subscriber’s content while any user still has an active subscription
to it, even if that subscription will terminate at the end of the
current billing cycle. Removing content that a subscriber is entitled
to access will result in penalties. Please see the policies document
for more information.
more information check below links:
1)
http://developer.android.com/google/play/billing/billing_subscriptions.html#cancellation
2) https://support.google.com/googleplay/answer/2476088?hl=en
3)
https://support.google.com/googleplay/android-developer/answer/140504?hl=en
You can not done this with out waiting until the subscription process cycle completes after cancellation of subs product, the only way remaining which is Free trial version it's only the way to provide us to test for the product cancellation in which product cancel immediately after you cancel subscription trial period, it will not continue until even trial periods ends.
more information check below link:
http://developer.android.com/google/play/billing/billing_subscriptions.html#administering
And I think it is better way because in the trial period you should go
with the actual credit card payment process but you doesn't need to
pay anything for it. Google play record the transaction as $0.00 for
the subscription process. And if you cancel the subscription the you
should not pay anything for testing, but yes I am not sure free trial version
is worked before you publish the app but it is only get by efforts only.
Conclusion:
In the current api it is not possible to test subcription product like
normal products and if user has been cancel the subscription product
then you have to wait to purchase the same product until the
subscription cycle has been expired, there is no another way if the
subscription cycle is going on and you can test for the same product
again before subscription cycle ends. And if you still want to test
for the same product then you have to choose another account for
testing it or another way is Free trials, you will not be any charged
until your Free trials period expired or cancel subscription in that
period and for the testing account before publish the app you will be refunded
automatically after 14 days of purchased product according to my
knowledge.
Hope it will solve your problem.
I have a horribly clunky workaround for this problem. Here is what I do every time I want to do a test of in-app subscriptions:
Create a new in-app subscription product in the google play developer console.
Point the android app at the new subscription product you just created.
In your code to check for active subscriptions, add a line to specifically ignore the order number of the previous subscription that you tested.
Export a release build of the app and transfer it directly to your testing device.
After testing, return to step #1 to test the next time.
Don't forget to fix your change from step #2 before deploying the app!
You might want to create many subscriptions in step #1 so you don't have to continually wait hours for them to propagate. Please comment if you know of a better way!
UPDATE: Google now has test subscriptions and is making it easier to use them! https://android-developers.googleblog.com/2018/01/faster-renewals-for-test-subscriptions.html
It seems that nowadays there is better solution:
Open your app page in Google Play Store application
Click "Manage subscriptions"
Click "Cancel subscription"
Go to "Settings", "Apps" in your phone.
Find Google Play Store and clear application data.
You should now be able to re-buy subscription.
Create a mock class that mocks out the Google Play methods that you are using.