Subscription downgrade renewal in sandbox

Hi, I am testing auto-renew subscriptin in the sandbox. If I purchase a subscription to Level 2, it renews every few minutes and I get notification in app. All good. But if, before it expires I do a downgrade to Level 1 using my app interface to purchase Level 1, the following happens.


The Level 2 subscription continues until it expires. What I then expect to happen is that I would then get a notiification that the new subscription has been purchased. But that doesn't happen, the latest receipt is saying the original subscription has expired. It does include the new subscription in the "pending" field, but in that field the "auto_renew_status" is set to 0, which I guess is why it didn't actually happen.


My question is: is this a sandbox thing? In production, will the new subscription purchase happen authomatically and I will get a receipt for the purchased downgrade subscription? If not, what is the way to handle this - a message to the user to say to go and manually renew subscription?


Gary

Replies

Not sure what you're doing w/sandbox is supported.


See https://forums.developer.apple.com/thread/110141


> My question is: is this a sandbox thing?


You can't test this in the sandbox


> In production, will the new subscription purchase happen authomatically and I will get a receipt for the purchased downgrade subscription?


In production you will get a receipt (and a call to updatedTransactions) indicating that the Level 1 was purchased when the Level 2 subscription expires. It will be exactly the same as what you would expect except the productIndentifier will be different and the expiration_date will reflect that.

My two-cents here is that this is a bug report issue. I've seen the alert, but I've never pursued the issue to see what happens after the "current" subscription in the sandbox expires. I will check this out later on. Assuming I can replicate the issue I'll have a bug report to file. For my test case, I'm going to save the base64 appStoreReceipt contents after the downgrade attempt failure, then re-validate the appStoreReceipt after the current subscription has ended.


I wonder if the issue has to do with the fact that auto-renewing subscriptions renew at an accelerated pace.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

I also have this bug before 2~3 days, Anybody know what's the reason?