• Home
    • Pugpig Bolt
    • App stores
    • Apple App Store

    Testing iOS iTunes App Store Purchases

    Written by Benji Weiser

    Updated at April 10th, 2025

    • Pugpig Bolt

      • Pugpig Site

        • Pugpig Archive

          • Working with Pugpig

            • Pugpig Consulting

              Table of Contents

              Testing iOS store purchasing Sandbox purchasing Sandbox subscription durations Testing successful restore purchases (sandbox) Sandbox receipts TestFlight Hot tip Even hotter tip More information

              Testing iOS store purchasing

              Bolt apps can offer iTunes (App Store) purchases for subscriptions and single issues. 

              Delete

              in-app purchasing will not work with wildcard signed builds



              Sandbox purchasing

              iTunes purchasing can be tested in the sandbox environment (this prevents any actual payment taking place) with development or ad hoc signed builds. See Apple's documentation on Testing in-app purchases with sandbox for more information. To test these you will need to use test Apple ID accounts (note: you cannot create a test user with the same email address as an actual user, including ‘tester’ or similar in the account name is good practice to avoid confusion). See Apple's Create Sandbox Apple IDs documentation for instructions on how to create such users. Note that such test users can be used across different apps from the same account. Apple recommends that you create at least one test account for each language that you provided localisation information for.


              Go into the app to test purchasing of single issues and subscriptions in sandbox mode. The app will prompt you to confirm and then log in with a test user to do this. iOS now supports a 'sandbox account' setting in the device settings, separate to the real Apple ID setting.

              You should test that both single issue and subscription purchasing works (where both are supported), and that these complete with no errors, and that access to entitled collections does not fail.

              Sandbox subscription durations

              Note: when testing auto-renewable in-app purchase subscriptions in the sandbox environment, the duration times will be compressed to allow for more streamlined testing. Additionally, a sandbox subscription will only auto-renew a maximum of 12 times. After the subscription has auto-renewed its maximum, it will no longer renew in the sandbox. The default compressed duration times are as follows:

              Actual duration Sandbox duration
              1 week 3 minutes
              1 month 5 minutes
              2 months 10 minutes
              3 months 15 minutes
              6 months 30 minutes
              1 year 1 hour


              Information about this can be found in Apple's testing an auto-renewing subscription and Manage Sandbox ID settings (under the 'Edit subscription renewal rate' heading) documentation. Note that this can be changed/set per sandbox ID if you wish.

              Testing successful restore purchases (sandbox)

              1. Make sandbox test purchase/s successfully
              2. In the devices' Store Settings log out as the test sandbox user
              3. Delete the app from the device and run/sideload onto the device again, or use a different device
              4. Press the restore purchases button in the app settings - you should be prompted to log in again
              5. Any previously made purchases as the same test user should be restored 
              6. Then make sure you can access what was previously purchased 

              Sandbox receipts

              Note that sandbox receipts work a little differently to production (and sandbox production) receipts, meaning that verify will not be called initially, so that a restore purchases action will have to be manually done in order to get a receipt at all (this might be relevant if you want to check the attached receipt, for example).

              TestFlight

              App-store signed builds can be used to test purchasing via TestFlight. See Apple's Testing Apps With TestFlight doc for (some) more information. This uses neither the sandbox nor production environments, but a secret third thing (sandbox production environment). This means that in-app purchases made during TestFlight beta testing will not carry over to real App Store versions of the app. It also does not take any real payments.

              The production sandbox (TestFlight) environment also uses compressed subscription durations.

              Please note that Testflight cannot be used with managed Apple IDs.

              Delete

              Hot tip

              If you're testing introductory offers and not seeing the right state on the button, try hitting the 'restore purchases' option before launching the subscription modal again.

              Delete

              Even hotter tip

              If uninstalling-reinstalling from Testflight to re/test purchasing, you need to delete the app from the home screen (not just uninstall via Testflight).



              More information

              See Apple's In-app purchase landing page which links out to further documentation on the subject.

              itunes test ios store itunes app store purchase purchasing testing testing purchasing test store purchasing testing store purchasing sandbox store purchases test purchase apple store

              Was this article helpful?

              Yes
              No
              Give feedback about this article

              Related Articles

              • Testing Store Purchasing
              pugpig logo white
              Navigation
              • Products
              • Customers
              • News
              • Podcast
              Contact
              • Contact us
              • LinkedIn
              • Twitter
              Technical Support
              • Status Page
              • Documentation
              • Customer Support
              Corporate
              • Company
              • Jobs
              • Privacy Policy

              © Kaldor Ltd. 2022

              Powered by Pugpig


              Knowledge Base Software powered by Helpjuice

              Expand