App Store

    Can I test in-app purchases without a sandbox user?

    A 2026 comparison of the three ways to test in-app purchases: StoreKit testing with a local config file, sandbox with a tester account, and TestFlight with a real Apple ID

    Setting up a sandbox tester account is a small hassle, and the good news is you often do not need one. Apple gives you three ways to test in-app purchases, and two of them require no sandbox user at all: StoreKit testing in Xcode, which runs locally against a configuration file, and TestFlight, which uses each tester's regular Apple ID. You only need a sandbox tester account for the middle path, testing against the live sandbox environment with a locally signed build. Here is how each works and when to reach for it.

    Short answer

    Yes, you can test in-app purchases without a sandbox user in two of Apple's three testing methods. StoreKit testing in Xcode uses a local .storekit configuration file, so you test products you define in the file, on the simulator or a device, with no sandbox account and no products in App Store Connect. TestFlight runs purchases through the sandbox environment behind the scenes, but testers use their normal Apple ID rather than a sandbox account, and purchases are free. You need a dedicated sandbox tester account only for the sandbox environment itself, when testing a locally signed build against products configured in App Store Connect.

    What you should know

    • StoreKit testing needs no sandbox user: it runs against a local config file.
    • TestFlight needs no sandbox user: testers use their regular Apple ID.
    • Sandbox testing does need one: a dedicated tester account for the sandbox environment.
    • StoreKit config is self-contained: products live in the file, not App Store Connect.
    • TestFlight purchases are free: no real charge during beta testing.

    What are the three ways to test in-app purchases?

    Apple provides StoreKit testing, sandbox, and TestFlight, each for a different stage. The table summarizes them.

    MethodNeeds a sandbox user?Where products are definedBest for
    StoreKit testing in XcodeNoA local .storekit configuration fileEarly local development
    SandboxYesApp Store ConnectEnd-to-end pre-release checks
    TestFlightNo, uses a real Apple IDApp Store ConnectBeta testing with real testers

    The split is that StoreKit testing is fully local and self-contained, sandbox exercises Apple's real test servers with a dedicated account, and TestFlight is end-to-end beta testing that quietly uses the sandbox environment while letting testers sign in normally. So the only method that strictly requires a sandbox tester account is the middle one.

    How do you test without a sandbox user using StoreKit?

    Use a StoreKit configuration file in Xcode. You add a .storekit file to your project, define your products and prices in it, and select it under Product, Scheme, Edit Scheme, so the app reads purchases from the file rather than from Apple's servers. This lets you test the full purchase flow on the simulator or a device locally, including subscriptions, refunds, and edge cases, without any sandbox account and without configuring products in App Store Connect first. It is the fastest way to develop and iterate on purchase logic, because everything is under your control in the file. When you want to move to a real server flow, you disable the configuration file, which switches testing to the sandbox environment.

    How do you test without a sandbox user using TestFlight?

    Distribute a TestFlight build, and testers buy with their normal Apple ID. TestFlight routes in-app purchases through the sandbox environment automatically, so testers are not charged, but unlike direct sandbox testing they sign in with their regular Apple ID rather than a dedicated sandbox account. This makes TestFlight the closest no-sandbox-user approximation of the real purchase experience, since it uses your products from App Store Connect and the production-like flow while keeping purchases free. It is the right method for end-to-end beta testing with real users before release. The one requirement is that your products are set up in App Store Connect, since TestFlight uses them rather than a local file.

    What to watch out for

    The first trap is mixing the methods up, such as expecting a sandbox tester account to work in TestFlight, where testers use a real Apple ID instead. The second is leaving the StoreKit configuration file enabled when you mean to test the real server flow, since the file shortcuts the actual sandbox. The third is testing only the purchase UI and not the receipt validation, which should happen on your server. A pre-submission scan such as PTKD.com (https://ptkd.com) reads the binary against OWASP MASVS for the security side, like confirming validation is not done insecurely on the device, which is a separate concern from which test method you use. Match the method to the stage, and validate receipts server-side regardless.

    What to take away

    • You can test in-app purchases without a sandbox user using StoreKit testing in Xcode or TestFlight.
    • StoreKit testing runs against a local .storekit configuration file with no sandbox account and no App Store Connect products.
    • TestFlight routes purchases through the sandbox automatically while testers use their regular Apple ID, and purchases are free.
    • A dedicated sandbox tester account is needed only for the sandbox environment itself; validate receipts on your server whichever method you use.
    • #in-app-purchase
    • #storekit-testing
    • #sandbox
    • #testflight
    • #iap-testing
    • #app-store-connect
    • #ios

    Frequently asked questions

    Can I test in-app purchases without a sandbox user?
    Yes, in two of Apple's three testing methods. StoreKit testing in Xcode runs against a local .storekit configuration file with no sandbox account, and TestFlight lets testers buy with their regular Apple ID rather than a sandbox account, with purchases free. Only the sandbox environment itself requires a dedicated sandbox tester account, used when testing a locally signed build against products set up in App Store Connect.
    How does StoreKit testing in Xcode work?
    You add a .storekit configuration file to your project, define your products and prices in it, and select it under Product, Scheme, Edit Scheme. The app then reads purchases from the file instead of Apple's servers, so you can test the full flow, including subscriptions and refunds, locally on the simulator or a device. No sandbox account or App Store Connect products are needed, which makes it the fastest way to iterate on purchase logic early.
    Does TestFlight need a sandbox account for IAP?
    No. TestFlight routes in-app purchases through the sandbox environment automatically, so testers are not charged, but they sign in with their normal Apple ID rather than a dedicated sandbox account. This makes TestFlight the closest no-sandbox-user approximation of the real purchase experience, using your App Store Connect products and a production-like flow. The only requirement is that your products are configured in App Store Connect, since TestFlight uses them.
    When do I actually need a sandbox tester account?
    For the sandbox environment itself, when testing a locally signed build, not a TestFlight build, against products configured in App Store Connect. That is the end-to-end pre-release check that exercises Apple's real test servers, and it requires a dedicated sandbox Apple ID created in App Store Connect. If you are developing locally, StoreKit testing avoids it, and if you are beta testing, TestFlight avoids it, so the sandbox account is for that specific middle case.
    Do I still need to validate receipts when testing?
    Yes. Whichever test method you use exercises the purchase flow, but receipt validation should happen on your server, not just in the app, so test that path too. Validating purchases only on the device is a security weakness regardless of how you tested the UI. A pre-submission scan such as PTKD.com checks the binary against OWASP MASVS for issues like insecure on-device validation, which is separate from which testing method you chose.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free