Overview of testing in sandbox
Apple provides a sandbox environment, which lets you test in-app purchases and Apple Pay transactions without incurring charges using test accounts. This environment uses the infrastructure of the App Store but doesn’t process actual payments. Instead, it returns transactions as if payments were processed successfully.
Users can test the following scenarios:
To get started, create Sandbox Apple IDs in App Store Connect and use them to sign in to a development-signed version of your app.
You also have the option to test in-app purchases with StoreKit. StoreKit testing in Xcode is a local test environment for testing in-app purchases that doesn’t require a connection to App Store servers. Use StoreKit testing in Xcode for testing in-app purchases before you configure them in App Store Connect, or to test your code when a network connection isn’t available. Learn how to test in-app purchases with Xcode and sandbox.