How to handle the display of a upgrade / downgrade of a subscription

Hello,

We want to implement a view that let the user change his current subscription.

We have 4 subscriptions with 2 different levels. Each level have a monthly and annual subscription. All the subscriptions are inside the same group.

So the user should be able to only have 1 subscription active at any time.

Inside the view, we display the current subscription that the user have. But with the downgrade or change of periodicity of the subscription, we have an issue. The subscription that will b renewed (the last one that the user has selected) is not the currently active subscription. What's the best practice in this case ?

Also we faced a similar issue doing this test:

  • I take a Level 2 (Liberty) annual subscription
  • I change it to a monthly subscription (it will change in 1 year).
  • I upgrade it to a Level 1 (Premium) monthly subscription.

Here is what I got from the receipt (tested with a trial period active):

"latest_receipt_info": [
    {
        "expires_date": "2021-10-09 17:31:29 Etc/GMT",
        "expires_date_ms": "1633800689000",
        "expires_date_pst": "2021-10-09 10:31:29 America/Los_Angeles",
        "in_app_ownership_type": "PURCHASED",
        "is_in_intro_offer_period": "false",
        "is_trial_period": "true",
        "original_purchase_date": "2021-09-09 17:31:30 Etc/GMT",
        "original_purchase_date_ms": "1631208690000",
        "original_purchase_date_pst": "2021-09-09 10:31:30 America/Los_Angeles",
        "original_transaction_id": "",
        "product_id": "subscription_premium_1_month",
        "purchase_date": "2021-09-09 17:32:41 Etc/GMT",
        "purchase_date_ms": "1631208761000",
        "purchase_date_pst": "2021-09-09 10:32:41 America/Los_Angeles",
        "quantity": "1",
        "subscription_group_identifier": "20792147",
        "transaction_id": "",
        "web_order_line_item_id": ""
    },
    {
        "expires_date": "2021-10-09 17:31:29 Etc/GMT",
        "expires_date_ms": "1633800689000",
        "expires_date_pst": "2021-10-09 10:31:29 America/Los_Angeles",
        "in_app_ownership_type": "PURCHASED",
        "is_in_intro_offer_period": "false",
        "is_trial_period": "true",
        "is_upgraded": "true",
        "original_purchase_date": "2021-09-09 17:31:30 Etc/GMT",
        "original_purchase_date_ms": "1631208690000",
        "original_purchase_date_pst": "2021-09-09 10:31:30 America/Los_Angeles",
        "original_transaction_id": "",
        "product_id": "subscription_liberty_1_year",
        "purchase_date": "2021-09-09 17:31:29 Etc/GMT",
        "purchase_date_ms": "1631208689000",
        "purchase_date_pst": "2021-09-09 10:31:29 America/Los_Angeles",
        "quantity": "1",
        "subscription_group_identifier": "20792147",
        "transaction_id": "",
        "web_order_line_item_id": ""
    }
],
"pending_renewal_info": [
    {
        "auto_renew_product_id": "subscription_premium_1_month",
        "auto_renew_status": "1",
        "original_transaction_id": "",
        "product_id": "subscription_premium_1_month"
    }
],

In this case what should I display for the user as active subscription and/or pending for renewal subscription?

Thank you for your time and guidance.

Regards,

Replies

To identify subscribers current subscription status use the latest receipt info object. To find the current transaction period the subscriber is entitled to sort by most recent purchase_date and check expires_date is in the future and is_upgraded is not equal true. 

To identify a subscribers upcoming renewal status check product_id is not equal to auto_renew_product_id in pending_renewal_info if so the subscriber has downgrade/cross-grade and check auto_renew_status to know if the subscriber intends to auto-renew or not.

You can also use new show manage subscription page to allow subscriber to manage subscription within the app. https://developer.apple.com/documentation/storekit/appstore/3803198-showmanagesubscriptions

Please ensure you are following the best practices and guidelines described in these two links; How to set up product levels: https://help.apple.com/app-store-connect/#/dev75708c031 (Overview of auto-renewable subscription group setup) Information about levels and behavior: https://developer.apple.com/app-store/subscriptions/ (Ranking Subscriptions Within the group )