Hey @Felix B
Due to sandbox’s accelerated renewal and expirations time, sometimes not all renewals will be reflected in the RevenueCat Customer History page. We also have a section about this in the documentation.
And a Bonus question is about the BILLING_ISSUE and the CANCELLATION events. When the subscription ends, like in this case because the user did not pay anymore, shouldn’t there be both events fired? Or do they just show up as one event in the RC dashboard?
The BILLING_ISSUE
event will trigger if and only if Google encountered issues charging a customer’s card. Note that in sandbox the number of renewals is random. The Billing Library documentation states “test subscriptions can renew a maximum of six times.” Meaning it’s an arbitrary number between 1 and 6. The app stores will randomly throw billing issues your way, but this is not guaranteed.
To simulate a BILLING_ISSUE
, you can change your test cards before the next renewal. Billing Library documentation for more information on the steps to simulate a billing issue. Pasting here for convenience:
- Sign up for an in-app subscription using your licensed test account and the payment method of "Test instrument always approves"
- Go to the Account > Subscriptions section of the Google Play app, click your test subscription, and change payment method to "Test instrument, always declines"
I have a second Bonus question, is the UNCANCELLATION event working (in sandbox)?
I would expect it to fire when a paused subscription is resumed, but this seams not to be the case. Instead a RENEWAL event is fired.
The SUBSCRIPTION_PAUSED
is an event type to detect a paused subscription on your server. There is no "resumed" event, will just be the next renewal. The UNCANCELLATION
event will trigger if a customer opts out of renewal and later reenables it. Note that SUBSCRIPTION_PASUED
AND CANCELLATION
are two different event types. To read more about paused subscriptions and cancellations.
Also, it seams that I have to open the app on device to cause some of the events to fire. Might this be the reason why I don\t see all the RENEWAL events in the sandbox, because they are too close together and if I don\t open the app inbetween the renewals, RC does not detect them? (Assuming that opening the app causes a manual update of the subscription status)
When the app is opened, the SDK will send our servers any transactions that were completed in the queue. To reduce data delivery times, I recommend setting up Platform Server Notifications. When Platform Server Notifications are set up, the app does not need to be opened in order for RevenueCat to detect these subscription updates.
Hope this helps!