StoreKit2 currentEntitlements after downgrade followed by upgrade

I'm testing subscription downgrade and upgrade cycles in sandbox, and seeing a behavior I can't explain.

  • Code is generally similar to WWDC sample code for StoreKit2, including listening to incoming transactions.
  • Three entitlement levels, say, Standard, Plus, Pro
  • Corresponding subscription plans all same duration (quarterly)

I go through this purchase sequence quickly,

  1. Purchase the Pro plan
  2. Before the Pro plan expires, purchase the Standard plan
  3. Still before the Pro plan expires, purchase the Plus plan

Transaction.currentEntitlements after each of the purchases (logged in transaction listener),

  • After step 1: { Pro plan }
  • After Step 2: { (only) Pro plan }
  • After Step 3: { Plus plan , Pro plan }

I was expecting to see {Standard, Pro } in entitlements after step 2 (user entitlement calculated from the set is still correct -- Pro). If that's not the case then why after step 3 entitlements includes both Plus and Pro plans?

For downgrades they take effect at renewal, so Step 2 is expected. For Step 3, are you sure Plus is below Pro in tier in App Store Connect? This would make more sense if Plus was equivalent or higher than Pro in tier, as those would not be downgrades and likely take effect immediately, setting the isUpgraded flag on the old Pro transaction.

I double checked the plans rank/order (Starter = 3, Plus = 2, Pro = 1), re-ran the experiment, and got the same result. I check currentEntitlements both right after the purchase and in the transactions listener; readings consistent and as reported.

StoreKit2 currentEntitlements after downgrade followed by upgrade
 
 
Q