Skip to main content

I am making a test purchase for a monthly subscription. It happens correctly the first time and for the correct user. I am using the always accept visa card from google testers. There is exactly one renewal happening which is fine and the second time I get CANCELLATION with BILLING_ERROR on the sandbox. 

Hi @aris, is this happening consistently when you test (cancelling after the first renewal), or only sometimes? I know that in sandbox it’s common for billing errors to be thrown occasionally just so you can test that scenario. 


@sundeep always.


@sundeep what can be done about this? it’s a total blocker for me publishing my app


I have this issue as well


Hi @aris, if it’s happening consistently after exactly 1 renewal, then honestly I’m not too sure - have you tried this flow with different sandbox accounts?

RevenueCat just reports what the store says about the user’s transactions, so if Google says the subscription was cancelled, then that’s what we’ll indicate to you. Can you check the order ID for this transaction in Google Play Console > Order Management - does it list the subscription as cancelled? You can use the transaction ID you’re seeing in the RevenueCat webhooks to search for the order in the console.


Hi @sundeep 

Thanks for the reply.

I have checked the orders in the Play Console and they all expire after 6 renewals. No billing errors.

So what is happening that the revenueCat Console reports a billing error.  None of the test subscriptions go their full term (6 renewals)

regards

Peter


Hi @sundeep I have exactly the same problem with @Peter Rule and it’s not a coincidence. For the same transaction id google play console correctly renews 6 times and revenuecat reports billing error after the 2nd renewal. I think it’s time to give the bug to the developers. 

 


Hi @aris - I’ve turned this post into a ticket in our system so I can ask some follow-up questions and get some examples (you should see a message in your email inbox).


Hi @sundeep , I am having the same issue while testing our App, for us it seems like it is always skipping one renew cycle, so when the user subscribes it works fine, then after 5 minutes I get renewal confirmation on my email and then revenuecat says there was a failure (either cancellation or billing error which is not correct), then in the 2nd renewal, it starts working again and I get the correct subscription.. been testing this the whole day seems to be affecting only Android at the moment


We wish to publish the application next saturday, can we be sure that this will not be a problem in production?


@aris @Peter Rule I spoke with an engineer and they suggested turning on server-to-server notifications to see if that affects the result (there are some differences in how we refresh receipts in sandbox vs. production and it’s possible that’s playing a role). I looked at your app configs and noticed you don’t have server-to-server notifications set up for Google, can you go through this guide to set those up and then try this again? https://docs.revenuecat.com/docs/google-server-notifications

Also, would you be able to share some recent sandbox App User IDs with this issue so I can take a closer look?

@Juliana Pagnoncelli Ferreira we’ve only heard about this occurring in sandbox, so I don’t think you need to worry about this in production. 


 

$RCAnonymousID:bf5f68d6a7b04d5a99de2651b676c244

$RCAnonymousID:4e152e7d24e04e398b76bf2c5dbdeb42

I will look at the server-to-server notifications


I set up server-to-server notifications and now the behaviour is all over the place.

Nothing shows in the sandbox console when I make a purchase.

I get an email that the order is cancelled but other emails stating that the subscription is ongoing.

My app believes the subscription is cancelled but when I go to buy it again it says it is active. I if I tap Restore Purchases I get “Nothing to restore”


@aris @Peter Rule I spoke with an engineer and they suggested turning on server-to-server notifications to see if that affects the result (there are some differences in how we refresh receipts in sandbox vs. production and it’s possible that’s playing a role). I looked at your app configs and noticed you don’t have server-to-server notifications set up for Google, can you go through this guide to set those up and then try this again? https://docs.revenuecat.com/docs/google-server-notifications

Also, would you be able to share some recent sandbox App User IDs with this issue so I can take a closer look?

@Juliana Pagnoncelli Ferreira we’ve only heard about this occurring in sandbox, so I don’t think you need to worry about this in production. 

 

Hi @sundeep, thanks for your reply, it does seem activating the server-to-server notifications fixed the issue for me for Google


I set up server-to-server notifications and now the behaviour is all over the place.

Nothing shows in the sandbox console when I make a purchase.

I get an email that the order is cancelled but other emails stating that the subscription is ongoing.

My app believes the subscription is cancelled but when I go to buy it again it says it is active. I if I tap Restore Purchases I get “Nothing to restore”

@sundeep I also received an email stating the subscription wasn’t acknowledged


@sundeep 

I have tried to de-activate server-to-server notifications but when I press ‘Disconnect From Google’. I get the following message.

Response not successful: Received status code 400.

Please advise ASAP how I get back to where I was before activating server-to-server notifications.


hi @sundeep I successfully de-activated server-to-server notifications but I still get the error email 

“this test purchase was cancelled because it was not acknowledged”. This only started occurring when I activated server-to-server notifications per your suggestion.

Please advise how I can get back to where I was.


@Peter Rule it sounds like the Play Store credentials you’ve entered in the RevenueCat dashboard are invalid. Without valid Play Store credentials purchases cannot be tracked or acknowledged by RevenueCat, and could cause a host of other issues.

You can confirm this by making a purchase with debug logs enabled and inspecting the log output for “Invalid credentials”. 


@ryan

Thanks that was it somehow the Service Account credentials JSON became unpopulated after I tried server to server notifications.


@ryan @sundeep using the RC guide to connect pub/sub isn’t working for me. I have a Firebase google play console credentials JSON but pub/sub requires a GCP service credentials account. Google says it is possible you have a different GCP and Firebase credentials but in RC dashboard in the app section connect to google returns a 400 error.

 

@Peter Rule I am afraid to publish into production. Can you confirm you only had the bug in the sandbox?

 


I am also experiencing unexpected cancellations of my test subscriptions in sandbox on Google Play. I would expect the test subscriptions to auto-renew every 5 minutes, rather than being cancelled after 5 minutes, because I have setup the subscription to auto-renew, not to auto cancel.

@Juliana Pagnoncelli Ferreira and @Peter Rule , have you published your apps in production? Does it work ok?

It would be a really serious issue both to me and to my customers to have my purchases gone cancelled in production.


Hi @UlyssesAlves,

 

Unfortunately, I cannot help debugging the specifics because I don’t have all the details, but my bet is that this is happening due to not acknowledging in time (therefore triggering a cancellation). This would not happen in production, since we do acknowledge Play Store purchases server side (but not in the first 5 minutes). SDK should also acknowledge though, unless you are in observer mode. Could that be the case?


@Miguel Carranza I couldn’t find a method in the SDK to acknowledge the purchases. My assumption is that it is mayble automatically acknowledged internally by the SDK, not with a public API/method I can call from my app. If that’s not the case, how should I acknowlege the purchases?


The SDK should do it automatically unless it’s set up in observer mode. If that’s not the case, I’d recommend you to reach to RevenueCat support with more information for further investigation.


No. I am not under observer mode, because I don’t pass any value to parameter observerMode of SDK setup method, which passes false to this argument by default.

 


Reply