Setting up Test Accounts for Testing In App Purchase

Before testing In App Purchase in your application, you need to create an In App Test User in iTunes Connect—you should not use other accounts as doing so will result in prompts to enter your credit card number and other information.

Here is how to properly set up your test user for testing In App Purchase:

  • Set up a test user account by selecting In App Purchase Test User in the Manage Users module of iTunes Connect. Be sure to create the test account with an email address that is not associated with any other Apple account. You’ll enter this test user ID and Password during your testing when prompted by the StoreKit framework to confirm a purchase.
  • Be sure to clear any account information stored on your test device by tapping the Sign Out button in the Store settings in the Settings application (this prevents a non-test account from automatically being used when testing).

    NOTE: Do not enter your test account information in the Store settings panel.
  • To test your In App functionality against the In App Purchase sandbox, connect your device to your development workstation then choose iPhone Device as the Active SDK—the StoreKit APIs are not available in the iPhone simulator.
  • When your app requests a payment via the StoreKit API, you’ll be prompted to confirm the purchase then prompted again with a Sign In panel. Select Use Existing Account then enter your sandbox test account email address and password to complete the purchase test.