TN3186: Troubleshooting In-App Purchases availability in the sandbox
Identify common configurations that make your In-App Purchases unavailable in the sandbox environment.
Overview
When testing your In-App Purchases in the Apple sandbox environment, your app may not display its products. After submitting your In-App Purchases to App Review, they might also be missing or unresponsive during review. The sandbox environment is a test environment for testing the In-App Purchase implementation in your app with real product data from App Store Connect. TestFlight also uses the sandbox for In-App Purchases. StoreKit queries App Store Connect for this data when your app calls StoreKit APIs in the sandbox. For more information, see Testing In-App Purchases with sandbox.
To offer In-App Purchases in your app, call products(for:) with a list of product identifiers (Product ID) matching these products in the sandbox. Product.products(for:) returns an array that includes an instance of Product for each of the In-App Purchases. Update your app’s UI with these returned instances, which contain all In-App Purchase information configured in App Store Connect for your app.
If Product.products(for:) fails to return a Product instance for your products in the sandbox, validate your product identifier list and confirm you set a price and added localizations for each of the In-App Purchases.
After you complete the above checks, retry the product request. If the In-App Purchases are still missing, it may be due to the following reasons:
Your CFBundleIdentifier doesn’t match the bundle ID of an app in App Store Connect.
Your bundle ID is disabled for the In-App Purchase capability in Certificates, Identifiers & Profiles.
You are using a wildcard App ID for your app.
You signed your app with an invalid certificate or provisioning profile.
You have an inactive Apple Developer Program account.
You don’t have a Paid Apps Agreement in effect in App Store Connect.
You have incomplete or outdated banking or tax information in App Store Connect.
Validate your product identifier list
To verify your product identifier list, perform these steps:
In your Xcode project, locate your app’s Preparing your app for distribution.
In App Store Connect, find the app that matches your app’s bundle ID.
Verify each product identifier in your list matches the product identifier (
Product ID) of an In-App Purchase created for the app in App Store Connect.
Identify the test environment
Apple provides test environments in Xcode and the Apple sandbox to help you verify your implementation of In-App Purchases. For more information, see Testing at all stages of development with Xcode and the sandbox.
If your Xcode project contains a Setting up StoreKit Testing in Xcode, ensure you are testing your In-App Purchases in the environment you wish to use. Setting up StoreKit Testing in Xcode in your Xcode project to test in the sandbox. Setting up StoreKit Testing in Xcode to test in Xcode local test environment.
Use a bundle ID registered in App Store Connect and enabled for In-App Purchase
Testing your In-App Purchases in the sandbox requires that your app uses a CFBundleIdentifier registered in App Store Connect and enabled for In-App Purchase in Certificates, Identifiers & Profiles. A bundle ID uniquely identifies your app throughout the system, for example, a bundle ID like com.example uniquely identifies an app using the bundle ID com.example.myapp and you are guaranteed that no other apps are using that same bundle ID. You register a bundle ID for your app when you create an App Store Connect record for the app. App Store Connect displays the registered bundle ID under the App Information section of your app. In your Xcode project, the bundle ID appears in the Preparing your app for distribution of your app’s target. Confirm the bundle ID in your Xcode project matches the bundle ID you have registered for your app.
After you confirm your Xcode project uses a registered bundle ID, verify you have enabled the In-App Purchase capability for the bundle ID. In the Identifiers section of Certificates, Identifiers & Profiles, select your bundle ID, scroll down to In-App Purchase under Capabilities, then confirm you have selected the capability.
Sign your app with a valid certificate and provisioning profile
To use In-App Purchases in your app, you must sign your app with a provisioning profile that grants the app access to the In-App Purchase capability. For more information, see capability. A provisioning profile contains App ID and capabilities information. Inspect your provisioning profile, confirm the value of App ID matches your registered CFBundleIdentifier and capabilities includes In-App Purchase. To view the content of your provisioning profile, see Diagnosing Issues with Entitlements in Diagnosing Issues with Entitlements.
Use automatic signing to allow Xcode to manage code signing for you. For more information, see Distributing your app to registered devices.
Review your Apple Developer Program membership
To build apps with advanced capabilities such as In-App Purchase, you must have an active developer account. For more information, see Apple Developer Program account. The following table lists reasons why your account might be inactive:
Reason | Solution |
|---|---|
The developer account expired. | Your Roles must renew membership, accept the Paid Apps Agreement again, and update tax and banking information. For more information, see Renewal. |
The most recent version of the Apple Developer Program Licence Agreement is available and unsigned. | Your Roles must accept the latest version of the Apple Developer Program Licence Agreement. |
Ensure you have a Paid Apps Agreement in effect
To offer In-App Purchases in your app, you must have a Paid Apps Agreement in effect in App Store Connect. The agreement is in effect if App Store Connect shows an Active status in its Agreements section. For more information about the statuses, see View agreements status. The following table lists reasons why your Paid Apps Agreement might not be in effect:
Reason | Solution |
|---|---|
The Paid Apps Agreement is unsigned. | Your Roles must sign the Paid Apps Agreement. |
The most recent version of the Paid Apps Agreement is available and unsigned. | Your Roles must accept the latest version of the Paid Apps Agreement. |
The Paid Apps Agreement expires. | Your Roles must renew the Paid Apps Agreement. |
Complete all banking and tax information
After you accept the Paid Apps Agreement, your Account Holder needs to submit all required banking and tax information. The banking and tax information are complete if App Store Connect shows an Active status in its Bank Accounts and Tax Forms sections, respectively. For more information, see banking, tax, and View agreements status.
After you renew the developer membership, check if your Account Holder needs to accept the Paid Apps Agreement and update the financial information again.
Retry your product request later
When you edit In-App Purchase information in App Store Connect, it can take up to 1 hour for your changes to appear in the sandbox environment. For more information, see View and edit in-app purchase information.
Revision History
2025-04-29 First published.
See Also
Latest
TN3205: Low-latency communication with RDMA over ThunderboltTN3206: Updating Apple Pay certificatesTN3179: Understanding local network privacyTN3190: USB audio device design considerationsTN3194: Handling account deletions and revoking tokens for Sign in with AppleTN3193: Managing the on-device foundation model’s context windowTN3115: Bluetooth State Restoration app relaunch rulesTN3192: Migrating your iPad app from the deprecated UIRequiresFullScreen keyTN3151: Choosing the right networking APITN3111: iOS Wi-Fi API overviewTN3191: IMAP extensions supported by Mail for iOS, iPadOS, and visionOSTN3134: Network Extension provider deploymentTN3189: Managing Mail background traffic loadTN3187: Migrating to the UIKit scene-based life cycleTN3188: Troubleshooting In-App Purchases availability in the App Store