Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

# In-App Purchases Not Available in Sandbox Testing Environment Despite Being Approved

I'm encountering an issue with in-app purchases in the Sandbox testing environment for our app Answify. Our subscription products were approved on April 9th, 2025, but they are not available when testing in the Sandbox environment.

Problem Description

When using the Product.products(for:) method from StoreKit 2 to request our approved in-app purchase products, an empty array is returned. This happens both with our main app flow and with a direct test that specifically requests the products.

Environment Details

  • App: Answify (Bundle ID: com.answify.Answify.iphone)
  • Build: 71 (available in TestFlight)
  • iOS: 18.4 (iPhone)
  • Testing date: April 21, 2025
  • Sandbox accounts tested:
    • purchase2 [at] it-xpert.be
    • sandbox [at] it-xpert.be (recently created)

Steps to Reproduce

  1. Login with a Sandbox test account
  2. Launch the Answify app
  3. Navigate to the subscription screen
  4. The app attempts to load products via Product.products(for:), but receives an empty array
  5. The app falls back to displaying dummy products with an error message

Attempted Solutions

I've verified the following:

  1. Correct Sandbox Environment: The app correctly identifies it's running in the Sandbox environment (confirmed via both app logs and UI indicators).

  2. Correct Sandbox Account: I've confirmed in iOS Settings that I'm using the Sandbox account (purchase2 [at] it-xpert.be). I've also tested with a different Sandbox account (sandbox [at] it-xpert.be) with the same results.

  3. Approved Products: All products have been approved since April 9th, 2025, and show as "Ready to Submit" in App Store Connect.

  4. Product IDs: I've triple-checked that the product IDs match exactly between the app and App Store Connect.

  5. Manual Transaction Testing: I've attempted to manually test transactions through the iOS Settings > Developer menu with the product ID "com.answify.subscription.personal" and lot ID "answify_subscriptions". This test also fails with "The product or lot identifier provided is not valid" error.

  6. Local StoreKit Testing: The products load correctly and purchases work when using a local StoreKit configuration file, confirming our implementation is correct.

Relevant Code

Here's the code we use to fetch products:

// In StoreManager.swift
func loadProducts() async {
    print("DEBUG: Starting product loading process from App Store")
    isLoading = true
    error = nil
    
    do {
        // 1. Fetch pricing packages from backend
        var pricingPackages: [PricingPackage] = []
        
        do {
            print("DEBUG: Fetching pricing packages from backend API")
            pricingPackages = try await fetchPricingPackages()
            print("DEBUG: Successfully received \(pricingPackages.count) pricing packages from backend")
        } catch {
            print("DEBUG: Error fetching pricing packages from backend: \(error)")
            pricingPackages = createHardcodedPricingPackages()
            print("DEBUG: Using \(pricingPackages.count) hardcoded pricing packages as fallback")
        }
        
        // 2. Load products from the App Store
        let productIdentifiers = Set(pricingPackages.map { $0.inAppPurchaseID })
        print("DEBUG: Requesting \(productIdentifiers.count) products from App Store with IDs: \(productIdentifiers)")
        
        do {
            // Attempt to load products
            let storeProducts = try await Product.products(for: productIdentifiers)
            print("DEBUG: Successfully loaded \(storeProducts.count) products from App Store")
            
            // Rest of implementation...
        } catch let storeKitError {
            print("DEBUG: StoreKit error when loading products: \(storeKitError.localizedDescription)")
            // Fallback to dummy products...
        }
    } catch {
        // Error handling...
    }
}

// Direct StoreKit test (also returns 0 products)
func testStoreKitDirectly() async {
    let productIDs = Set([
        "com.answify.subscription.personal",
        "com.answify.subscription.personal.yearly",
        "com.answify.subscription.startup",
        "com.answify.subscription.startup.yearly",
        "com.answify.subscription.business_monthly"
    ])
    
    do {
        let products = try await Product.products(for: productIDs)
        print("DEBUG: Directly received \(products.count) products from StoreKit")
    } catch {
        print("DEBUG: Direct StoreKit test error: \(error.localizedDescription)")
    }
}

Console logs

Here is the relevant console output:

DEBUG: Requesting 5 products from App Store with IDs: ["com.answify.subscription.startup.yearly", "com.answify.subscription.personal.yearly", "com.answify.subscription.startup", "com.answify.subscription.personal", "com.answify.subscription.business_monthly"]
DEBUG: Successfully loaded 0 products from App Store
DEBUG: No products found in the App Store. Switching to dummy products.
DEBUG: Creating dummy products since App Store products couldn't be loaded
DEBUG: Running direct StoreKit product retrieval test
DEBUG: Directly requesting 5 products from StoreKit
DEBUG: Directly received 0 products from StoreKit

Question

Is there any additional step required after product approval to make them available in the Sandbox environment? Could there be an issue with the App Store Sandbox environment itself?

Any guidance would be greatly appreciated. This issue is blocking our testing and release process.

Thank you!

Some additional info. When validating the app, I have added the subscriptions in the package. After some loops with verification team, they finally validated the application, bit not the subscription. I opened a case to ask why and what I have to do. Finally they verified the subscriptions (manually ?) I have the impression now that those subscriptions are validated but not attached to any version of our app (verified for 1.1, waiting verification for 1.2). When going to version 1.2 who is ready for verification, there is no option to add the subscriptions to this version. I try to explain that via a ticker with apple review support team, but they forward me to this forum... I really think something is broken in the link between the app and the subscription and I do not know how to relink both.

Any idea ?

Found the root cause... No bank account was defined in the Business section of the AppStore connect website. Very stupid root cause. Hope this message can help others in the future.

# In-App Purchases Not Available in Sandbox Testing Environment Despite Being Approved
 
 
Q