The problem which you have described leads me to ask - In the App Store Connect records for your application - what is the order of the subscription items within the subscription group. Is the 1 Week subscription plan an upgrade to the 3 month subscription? or vice versa? The ordering of the subscription items listed in the application records determines whether one subscription item is an upgrade or a downgrade to another item. Duration of subscription is not used to determine whether one subscription item is an upgrade or a downgrade to another subscription item.
As such, per the In-App Purchase Program Guide - Working with subscriptions section, Upgrades and Plan Changes subsection
"Users can manage their subscriptions in their account settings on the App Store, or within your app’s interface. For each subscription, the App Store shows all the renewal options that the subscription group offers. Users can easily change their service levels and choose to upgrade, downgrade, or cross-grade as often as they like. Downgrades of any duration or cross-grades with different durations go into effect at the next renewal date."
If the 3 month plan is a downgrade to the 1 week plan, then when the 1 week plan is currently active for a subscriber, then if the user attempts to "downgrade" to the 3 month plan, the iTunes Store should indicate to the user that the new plan will go into effect at the end of the current subscription. In this case, the user account has not been charged. The essence is that the transaction was not a success, but instead a failure. As there is no "user to be charged later" state, the App Store returns the failed transaction result.
Keep in mind, that the app should already know that there is an active subscription in place which the user should still have access to.
There's also server-to-server notifications when this happens, but that was not the question.
rich kubota - firstname.lastname@example.org
developer technical support CoreOS/Hardware/MFI
Thanks for your detailed answer, Rich. Our current order is Weekly, Yearly, Quarterly (from top to bottom). How should it be and is there a way to change the order in App Store Connect?
However, we receive the .failed transaction regardless of the order of the subscription change. No matter whether we start with Weekly and switch to Quarterly, or start with Quarterly and switch to Weekly, we always get that .failed transaction. So apparently it doesn't matter whether it's a downgrade or upgrade.
Also, shouldn't there be some sort of confirmation from StoreKit that a renewal pref change went through? Seeing an "All set" alert from StoreKit followed by a .failed transaction seems very strange.
One speculative answer - I was always confused about this upgrade/downgrade idea and how the app store can figure out what to charge if you are half way through one subscription and you upgrade to another subscription. In all cases, I think (but I could be wrong) that at the conclusion of the current subscription period (even if the user upgraded or downgraded) the user will be told that the subscription will autorenew to the upgraded or downgraded subscription period and, if they don't object, the subscription for the upgrade (or downgrade) renews. In that case, the change in subscription itself, whether it is an upgrade or a downgrade, would result in nothing being billed until the current subscription expires - and therefore the change itself results in a 'failed' transaction.
And another speculative answer - when a user tries to make a purchase and their credit card info is out of date, the App Store asks them to update the credit card info. After they upgrade the credit card info the App Store asks if they want to go forward with the purchase? If they say yes the App Store generates two successive transactions - one failed and the other purchased. Is that what is going on in the case of an upgrade?
This is all based on the sandbox but what I can say is, there's just one transaction, the failed one.