Does test sandbox autorenew subscriptions IOS?
Asked Answered
L

2

7

I've been working on implementing an autorenewing subscription app. I have the actual purchase of the subscription working fine.... I choose the 1 month subscription which should last 3 minutes, before it expires... the initial purchase actually works fine.. but after 3 minutes its expired and I never see the autorenew happen or get a new receipt or anything so the app properly just says.. go away....

The documentation says it should autorenew 5 times before it cancels itself, but I never seem to get a new receipt or anything after the initial purchase.

Is there something/somewhere else I should be looking or checking? Am I missing something?

Lukas answered 14/11, 2016 at 14:30 Comment(0)
K
3

Sandbox users subscriptions are auto renewed but in a shorter time frames - it will renew every few minutes.

For the sake of testing, there are some differences in behavior between auto-renewable subscriptions in the production environment and in the test environment.

Renewal happens at an accelerated rate, and auto-renewable subscriptions renew a maximum of six times per day. This lets you test how your app handles a subscription renewal, a subscription lapse, and a subscription history that includes gaps.

Taken from apple documentation.

As for the receipt - you won't get a new one but you should get another transaction under the same receipt for the renewal. The transaction will wait for you in the transaction queue, you should use SKPaymentTransactionObserver to monitor new transactions in the SKPaymentQueue. And if you validate the receipt, you will also see the new transaction with an updated expiration date.

After a subscription is successfully renewed, Store Kit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time it’s launched.

Also from the same documentation.

Knopp answered 14/11, 2016 at 15:34 Comment(3)
I think I figured out my issue, the renewals happen, but if I recompile the code in any way shape or form the validation against the renewal fails and a new purchase is forced, so its not the auto renewal per se, it something when the build changes vs the purchase/renewal that is causing failed validations.Lukas
I m showing subscription screen when user's monthly subscription expired but that screen not showing and in apple reciept getting next day for expirationEmmenagogue
I tried same on yesterday but subscription not expire today asloEmmenagogue
D
2

For my case, in sandbox testing for subscription, it will only auto renew the subscription for 5 only on the FIRST subscription purchase. Subsequent subscription purchase will stop renewing after purchase.

Deandeana answered 26/5, 2020 at 23:38 Comment(1)
thanks for your feedback. I was confused why it's not calling 5 times. thought maybe something wrong with my development. but you saved my day :)Priory

© 2022 - 2024 — McMap. All rights reserved.