How to test subscriptions purchased through an application in the App Store?

Katarzyna Oświecińska

Auto-renewable subscriptions and Introductory Offers.

Definitely in a testing environment – Sandbox, which uses the App Store infrastructure, yet does not process real payments. All payments are always successful. Sandbox testers will be required for testing.

In a testing environment, an auto-renewable subscription renews maximum 12 times and then in automatically canceled. The default setting for monthly subscription renewal rate is 5 minutes. The duration can be customized for each Sandbox tester. Further on, I will explain where to do it.


Before we start testing, let’s make sure we have done the following:

  1. Add subscription to App Store. https://help.apple.com/app-store-connect/#/dev75708c031
  2. Create a Sandbox tester account.
  3. iPhone preparation:
  • sign in to Apple ID account (iPhone Settings)
  • sign in to “Sandbox” account.
    Settings (iPhone) -> App Store -> Sandbox Account.
  • install the app supporting new subscriptions


re. 2 Creating a Sandbox tester account

  1. You will need a new e-mail address – this cannot be your Apple ID (https://support.apple.com/pl-pl/apple-id)
  2. After signing in to AppStoreConnect, go to Users and Access -> Sandbox -> Testers -> plus sign in a blue circle
  3. Type in the created e-mail address and further data
  4. Important! Password – necessary for signing in to the new Apple ID tester account





Tester’s account setting – what can I do?



  1. Set Country or Region (App Store Country or Region)
  2. Change the monthly subscription renewal rate (this entails changing time for yearly subscription as well)
  3. Enable purchase interruption (before you finalize your purchase, you need to e.g. accept the terms and conditions – available on devices with iOS 14 or higher)\
  4. Remove tester
  5. Clear purchase history
    a. By clicking Edit on the right side in the Sandbox Testers list view.
    b. Then selecting a tester (using the checkbox on the lefthand side) and clicking “Clear Purchase History”.

From my observation, clearing the history is not always applied quickly and successfully.

According to Apple, clearing history with a long purchase list may take more time. There is no exact information on how long exactly.
With a short list, clearing usually takes a moment – although not always.

For the special offer testing, I recommend creating a new tester.

PS. Each app downloaded from the App Store has its own receipt or purchased subscriptions bill.

Let’s say we have two subscription in the app: a monthly and a yearly one, and that introductory offers are available for both.


Introductory offer – how offers work?

Before the first subscription purchase, we can choose which offer we make use of. If you make use of the monthly subscription offer, you are not eligible to use it again, including any future use of a yearly offer.

How can you check whether the user has already made use of the offer?
https://developer.apple.com/documentation/appstorereceipts/is_in_intro_offer_period

In the receipt, each product has an is_in_intro_offer_period field (specifying offer use).
If for any of them the field value is 1, it means that the customer has already made use of the offer for this app and is not a new customer.

Testing

Subscription purchase and auto-renewability verification

  1. Buy a monthly or yearly subscription
  2. Confirm with a password (the one for the tester’s Apple ID account)
  3. Verify the renewability after a certain time (the monthly subscription has duration of 5 minutes, the yearly one – 1 h)

Cancelling a subscription

  1. You have a purchased subscription
  2. Close the app
  3. Go to Settings (iPhone) → App Store → Sandbox account
  4. Click the e-mail address and select Manage
  5. Then click Cancel subscription
  6. Wait for the amount of time assigned to the subscription (5 minutes for monthly, 1 hour for yearly – if you had not changed the default settings)
  7. Run the app and check if there is information on a subscription available for purchase

Verifying whether the next subscription will be a special offer

  1. Purchase a special offer subscription
  2. Close the app
  3. Cancel the subscription
  4. Run the app and check whether you are able to buy a special offer subscription
  5. If not, you have handled the special offer availability correctly

Previous Post