Help Witch subscription Upgrade/downgrade tests in sandbox

hello. on my app i have 3 different subscriptions of 1,3,12 months, i have to test it and something is going wrong. i do all in this way

  1. open the app
  2. purchase 1 month subscription
  3. close the app and under Settings->App Store->sandbox account->manage->subscriptions switch to 3 months subscription
  4. after 5 minutes open up the app again and check that the current subscription is the 3 months one.
  5. the downgrade it back to the 1 month one and a message that says "you have already purchased this item" will be showed.

are this ok? by the way my app is made with unity and their IAP, but the error is coming from IOS UI so should be related to the sandbox test part instead a problem with unity IAP..

Your approach to testing subscription upgrade/downgrade in the sandbox environment seems reasonable, but there are a few things you should consider and potentially adjust to ensure a smooth testing process.

  1. Test Durations: When testing subscription upgrades/downgrades, you might want to consider using shorter durations for each subscription tier in the sandbox environment. This will allow you to test the functionality more quickly and iterate through different scenarios efficiently.

  2. Test All Scenarios: Apart from testing the upgrade from 1 month to 3 months and downgrade back to 1 month, it's also important to test all possible scenarios, such as upgrading from 1 month to 12 months and downgrading from 12 months to 3 months or 1 month. This will ensure that your app handles all potential subscription changes gracefully.

  3. Wait Time: You mentioned waiting for 5 minutes before opening the app again. The subscription status might not get updated instantly, so it's a good practice to allow some additional time before checking the subscription status again. You can wait for a longer duration to be more certain that the subscription status has been updated.

  4. Verify Receipts: Make sure that you are correctly verifying the subscription receipts on the server-side to ensure that the subscriptions are active and valid during the testing process.

  5. Test on Different Devices: Test your subscription upgrade/downgrade flow on various iOS devices to check for any device-specific issues that might arise.

  6. Unity IAP Sandbox Testing: Double-check that you've set up Unity IAP correctly to work with the iOS sandbox environment. Ensure that the Unity IAP settings are correctly configured for the different subscription durations.

  7. Review Error Logs: If there's an error message shown during testing, make sure to check the error logs both in Unity and Xcode to identify the root cause of the issue.

  8. Reset Sandbox Account: If you encounter any unexpected behavior, you can try resetting the sandbox account on the device to start the testing process from scratch.

Hello. Thank you for your help. right now i'm able to test it without problem, except for Downgrade.

this won't work :

  1. Open the app and buy 3 months subscription
  2. confirm the purchase and close the app
  3. open again the app and try to downgrade from 3 to 1 month subscription by buying 1 month one
  4. here i get the purchase success message from the IOS UI but my in game UI is stuck in waiting state and i'm not able to do nothing, but if i go to the IOS settings menu and under mySandboxID->Manage->Subscriptions i'm able to confirm that 1 month plan is the active one.

but this will work :

  1. subscribe from the app to the 3 month plan and close the app,
  2. then from the appstore sandboxID i manage my subscription and downgrade it to the 1 month one,
  3. after 15 minutes i confirmed that my current subscription under the app is the 1 month one,

so i did a quick check on Unity Forum to figure out if there is an issue on the IAP side, and i found an interesting post from an Unity Staff member here : https://forum.unity.com/threads/ios-subscription-upgrade-downgrade.804687/

he/she says :

Note for iOS: Sandbox is known to not support the Upgrade/Downgrade properly (especially the UI)

are this true? we must know if Sandbox doesn't support upgrading/downgrading properly.

Please review your subscription group and the levels each of your subscriptions products are configured to. As THAT is what determines what is an "upgrade" vs "downgrade".

What you described initially in #3 vs #5 makes me think you are not upgrading (instant plan change) but actually "crossgrade/downgrade" where the change goes into effect at the end of the current period. Level 1 (top) is the highest. So going from a level 2 to 1 is an upgrade. 1 to 2 is downgrade. If both products are say a level 1, then duration determines behavior: same durations = upgrade, different durations = cross grade.

See this for more info on your levels you configured in ASC: https://developer.apple.com/help/app-store-connect/manage-subscriptions/offer-auto-renewable-subscriptions See this description of how levels determine upgrade vs downgrade before: https://developer.apple.com/app-store/subscriptions/#ranking

I'm very curious on the note about sandbox proper support and UI. If there is more info, please share. As Sandbox is accelerated where durations is just a matter of minutes, the user experience still shows the date so only in SK transactions can you see the purchase and expires timestamps to truly see status.

Thank you for your help! everything is set right, Subscription are grouped toghether. from our test we are facing that on Downgrading the subscription none of the callback provided from the unity IAP are called.

  1. Open The game and go to the Subscriptions screen
  2. Buy 3 months plan ( we have 1,3,12 months subscription plans)
  3. we have confirmed that 3 months lan are purchased and reflected to the InGame UI
  4. from here we are trying to Downgrade to the 1 month subscription but this time we are getting the Apple translaction succeed UI message but none of the callback OnPurchaseFailed() and ProcessPurchase() are called and our in game UI freeze because is waiting for a response.. ( we have confirmed that on the sandbox ID manage page the current active subscription is the 1 month one )

so we are pretty sure that is a bug of the Unity IAP.

Help Witch subscription Upgrade/downgrade tests in sandbox
 
 
Q