How to cancel test subscription in Google play developer console - android

I initially had test accounts for testing in -app purchases in android but I since removed the testing accounts and moved the app from beta to production. Both test accounts have attempted to cancel their test subscriptions through the Google play app according to documentation. Although the Google play app says the subscription had canceled, it still remains active. Even with trying to uninstall the app. How can I remove the test subscriptions?
I have removed the beta test apk from the Play Store and disabled testing. I have removed all testing accounts from the licensing page as well as the authorized beta testers list. Beta test users are still reporting having an active (daily) test subscription. No matter how many times they hit cancel, it still renews the next day. I need to get this removed. It is hindering our development process.

Assuming you're testing with real transactions where you got a token when you subscribed, you can try cancelling subscription using Google Play Developer API > Cancel Subscription
Purchases.subscriptions: cancel
Cancels a user's subscription purchase. The subscription remains valid until its expiration time.
HTTP request
POST
https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token:cancel
where
packageName string The package name of the application for which this
subscription was purchased (for example, 'com.some.thing').
subscriptionId string The purchased subscription ID (for example, 'monthly001').
token string The token provided to the user's device
when the subscription was purchased.
The API requires authorisation.
Also check this
Canceling completed test purchases
Google Play accumulates completed test purchases for each user but
does not pass them on to financial processing.
In some cases, you might want to manually cancel a test purchase to
continue testing. To do so, open the app page in the Play Store. If
the test purchase that you want to cancel is a subscription, you can
also use the cancel() method of the Purchases.subscriptions API.

Related

How to cancel in-app test purchase with billing:2.0.3 library

I use kotlin example from google in my app (com.android.billingclient:billing:2.0.3).
Since I call playStoreBillingClient.acknowledgePurchase(params) and try to cancel purchase with cosumeAsync(token) (which ok with 1.2 version) I get next error:
/** Failure to consume since item is not owned */
int ITEM_NOT_OWNED = 8;
From google docs https://developer.android.com/google/play/billing/billing_testing
"Cancel a completed test purchase
Google Play accumulates completed test purchases for each user but does not pass them on to financial processing.
Test purchases are not automatically canceled, so you might want to manually cancel a test purchase to continue testing. To do so, open the app page in the Play Store."
But what I should do on app page?
Also I tried to refund from google play console
This worked for me, refund the purchase in the play console, then clear Google play store cache and data.[This is if you have acknowledge the purchase].
To save stress, you can do it this way, when the purchase is made, do not acknowledge the purchase, the purchase will be refunded automatically after 5 minutes, then you will be able to test the purchase again. If you are done testing, you can now acknowledge the purchase.

Google in-app billing cancel test purchase

I'm testing in-app billing with my own cellphone
I've sucessfully added some acounts to alha track and they can now buy the goods in the test mode.
The thing is due a bug existent in the first alpha version the purchased good wasn't being consumed and now everytime i try to purchage i get
ITEM_ALREADY_OWNED
int ITEM_ALREADY_OWNED
Failure to purchase since item is already owned
reading googles guide about testing in-app billing it says:
Cancel completed test purchases Google Play accumulates completed test
purchases for each user, but does not pass them to financial
processing.
In some cases, you may want to manually cancel a trial purchase to
continue testing. To do so, open the app page in the Play Store. If
the test purchase you want to cancel is a subscription, you can also
use the cancel () method of the Purchases.subscriptions API.
I do not find an option to cancel the test purchases at googles play page of my app, nor in the console neither in the tester account...
how can i cancel it to keep testing?
The problem here is that you need to consume the item, instead of cancelling. The item was purchased, and while not consumed you won't be able to buy it again. Please check this answer on how to consume the item. Hope it helps.

google in-app subscription unexpected behavior

I trying to test Android In-App Billing V3 to make subscription purchases.
Im aware of the following:
"Test subscription purchases recur daily, regardless of the product's subscription period."
but I noticed the following behavior:
A user buys a monthly subscription through google play, the client passes the information to the server. On the server side, I make an API call to google to get more info about the subscription.
I go to the Google play dashboard and cancel the subscription. (it changes from renewing on X to expire on X).
I buy the same subscription again but I have the following behavior:
Purchase token is the same as in #1. My assumption that the purchase
token will be different.
autoRenewing is still set to false (even
though google play dashboard shows "will renew on x").
expiryMills still shows the original expiration which is in the past (I resubscribed a couple of days later so I would expect the expiryMills to be updated)
Im not sure if this is the correct beahvior or not ...
I would expect the following: If im in within the period, so after the user cancels and then resubscribes, the autoRenewing will "true", and if im after the period, I will get a new purchase token so that the information I get from google api will match the google play dashboard.
Ofir

How do I test Google Play Android subscription?

How do I test a Google Play Android subscriptions and Google API?
The app is uploaded, but not published.
The APK is activated.
The subscription product id is published.
I tried to purchase subscription on totally unrelated phone, not my account.
All accounts I tested are listed in Android Developer Console > Edit Profile
The BILLING_REQUEST_ITEM_TYPE is set to "subs".
The BILLING_REQUEST_API_VERSION is set to 2.
The app is signed and a release version, ant release installr.
IGNORE THIS: When I try to purchase a subscription, it displays the subscription description, but immediately says "The item you are requesting to purchase is not available."
I cannot test the Google Android Publisher web API, https://developers.google.com/android-publisher/v1/purchases/get
IGNORE THIS: It requires a user subscription token but I can't get a token without buying a subscription!
Ok somehow it started to work and I was able to purchase a subscription. However, there was an error in my script on the server so I was not able to save the user subscription token. Now when I try to repurchase the subscription, it says "You already own this subscription."
When I click Details, it says "Item not found." with a Retry button!
I feel like I'm the only one in the world trying to use this API!
Additionally, there is an error in the Google billing API. I do not call mBillingService.confirmNotifications() until after I receive a confirmation from the server that the subscription was saved, yet I see a charge/deposit in my merchant account.
Have you installed a signed version of your .apk on your test-device? In order for Google Play to acknowledge your purchase request, the .apk needs to be signed (through the usual "Export"-feature in Eclipse, for example)

Testing subscription in Android: item not found

I am trying to test the new subscriptions in Google Play but the service returns "Item not found".
I've used the identifier "android.test.purchased" to test.
With this identifier I can test perfectly the normal in-app product, but whith subscription it doesn't work.
In the Google Play Console I added a subscription, and it is published.
Do I have to use the real subscription identifier and pay for testing?
Thank you
Even I have been looking for this , and am guessing that you may have already solved your problem.But this might help others
Even I have been unable to find any documentation about test product-ids for subscription however Testing In-App billing suggests only use of 4 reserved static product ids. This makes me infer that there is no test-id for subscription.
Hope this helps
yes,you will have to use real subscription and pay (you can cancel later).
there's no test for subscription.
notice that you will have to send in your request
api version=2 and product type should be "subs".
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.
Although, please note that the test user(Google account) must have a valid credit card added to the Google Wallet account in order to make test purchases(which are not charged). While making the purchase, the purchase confirmation dialog clearly mentions that this is a test purchase and you will not be charged.

Categories

Resources